aboutsummaryrefslogtreecommitdiff
path: root/include/hw/s390x
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/s390x
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.bz2
Use DECLARE_*CHECKER* macros
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/s390x')
-rw-r--r--include/hw/s390x/3270-ccw.h8
-rw-r--r--include/hw/s390x/ap-device.h4
-rw-r--r--include/hw/s390x/css-bridge.h8
-rw-r--r--include/hw/s390x/event-facility.h18
-rw-r--r--include/hw/s390x/s390-ccw.h8
-rw-r--r--include/hw/s390x/s390-virtio-ccw.h6
-rw-r--r--include/hw/s390x/s390_flic.h16
-rw-r--r--include/hw/s390x/sclp.h5
-rw-r--r--include/hw/s390x/storage-attributes.h16
-rw-r--r--include/hw/s390x/storage-keys.h12
-rw-r--r--include/hw/s390x/tod.h7
-rw-r--r--include/hw/s390x/vfio-ccw.h4
12 files changed, 38 insertions, 74 deletions
diff --git a/include/hw/s390x/3270-ccw.h b/include/hw/s390x/3270-ccw.h
index ac254f9..9a11093 100644
--- a/include/hw/s390x/3270-ccw.h
+++ b/include/hw/s390x/3270-ccw.h
@@ -33,12 +33,8 @@
typedef struct EmulatedCcw3270Class EmulatedCcw3270Class;
typedef struct EmulatedCcw3270Device EmulatedCcw3270Device;
-#define EMULATED_CCW_3270(obj) \
- OBJECT_CHECK(EmulatedCcw3270Device, (obj), TYPE_EMULATED_CCW_3270)
-#define EMULATED_CCW_3270_CLASS(klass) \
- OBJECT_CLASS_CHECK(EmulatedCcw3270Class, (klass), TYPE_EMULATED_CCW_3270)
-#define EMULATED_CCW_3270_GET_CLASS(obj) \
- OBJECT_GET_CLASS(EmulatedCcw3270Class, (obj), TYPE_EMULATED_CCW_3270)
+DECLARE_OBJ_CHECKERS(EmulatedCcw3270Device, EmulatedCcw3270Class,
+ EMULATED_CCW_3270, TYPE_EMULATED_CCW_3270)
struct EmulatedCcw3270Device {
CcwDevice parent_obj;
diff --git a/include/hw/s390x/ap-device.h b/include/hw/s390x/ap-device.h
index b3b3e98..fb250a2 100644
--- a/include/hw/s390x/ap-device.h
+++ b/include/hw/s390x/ap-device.h
@@ -21,7 +21,7 @@ struct APDevice {
};
typedef struct APDevice APDevice;
-#define AP_DEVICE(obj) \
- OBJECT_CHECK(APDevice, (obj), AP_DEVICE_TYPE)
+DECLARE_INSTANCE_CHECKER(APDevice, AP_DEVICE,
+ AP_DEVICE_TYPE)
#endif /* HW_S390X_AP_DEVICE_H */
diff --git a/include/hw/s390x/css-bridge.h b/include/hw/s390x/css-bridge.h
index 05786b3..9fd4484 100644
--- a/include/hw/s390x/css-bridge.h
+++ b/include/hw/s390x/css-bridge.h
@@ -24,8 +24,8 @@ struct VirtualCssBridge {
typedef struct VirtualCssBridge VirtualCssBridge;
#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge"
-#define VIRTUAL_CSS_BRIDGE(obj) \
- OBJECT_CHECK(VirtualCssBridge, (obj), TYPE_VIRTUAL_CSS_BRIDGE)
+DECLARE_INSTANCE_CHECKER(VirtualCssBridge, VIRTUAL_CSS_BRIDGE,
+ TYPE_VIRTUAL_CSS_BRIDGE)
/* virtual css bus type */
struct VirtualCssBus {
@@ -34,8 +34,8 @@ struct VirtualCssBus {
typedef struct VirtualCssBus VirtualCssBus;
#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus"
-#define VIRTUAL_CSS_BUS(obj) \
- OBJECT_CHECK(VirtualCssBus, (obj), TYPE_VIRTUAL_CSS_BUS)
+DECLARE_INSTANCE_CHECKER(VirtualCssBus, VIRTUAL_CSS_BUS,
+ TYPE_VIRTUAL_CSS_BUS)
VirtualCssBus *virtual_css_bus_init(void);
#endif
diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h
index dd1a6a4..eccf6e9 100644
--- a/include/hw/s390x/event-facility.h
+++ b/include/hw/s390x/event-facility.h
@@ -44,12 +44,8 @@
#define TYPE_SCLP_EVENT "s390-sclp-event-type"
typedef struct SCLPEvent SCLPEvent;
typedef struct SCLPEventClass SCLPEventClass;
-#define SCLP_EVENT(obj) \
- OBJECT_CHECK(SCLPEvent, (obj), TYPE_SCLP_EVENT)
-#define SCLP_EVENT_CLASS(klass) \
- OBJECT_CLASS_CHECK(SCLPEventClass, (klass), TYPE_SCLP_EVENT)
-#define SCLP_EVENT_GET_CLASS(obj) \
- OBJECT_GET_CLASS(SCLPEventClass, (obj), TYPE_SCLP_EVENT)
+DECLARE_OBJ_CHECKERS(SCLPEvent, SCLPEventClass,
+ SCLP_EVENT, TYPE_SCLP_EVENT)
#define TYPE_SCLP_CPU_HOTPLUG "sclp-cpu-hotplug"
#define TYPE_SCLP_QUIESCE "sclpquiesce"
@@ -200,14 +196,8 @@ struct SCLPEventClass {
#define TYPE_SCLP_EVENT_FACILITY "s390-sclp-event-facility"
typedef struct SCLPEventFacility SCLPEventFacility;
typedef struct SCLPEventFacilityClass SCLPEventFacilityClass;
-#define EVENT_FACILITY(obj) \
- OBJECT_CHECK(SCLPEventFacility, (obj), TYPE_SCLP_EVENT_FACILITY)
-#define EVENT_FACILITY_CLASS(klass) \
- OBJECT_CLASS_CHECK(SCLPEventFacilityClass, (klass), \
- TYPE_SCLP_EVENT_FACILITY)
-#define EVENT_FACILITY_GET_CLASS(obj) \
- OBJECT_GET_CLASS(SCLPEventFacilityClass, (obj), \
- TYPE_SCLP_EVENT_FACILITY)
+DECLARE_OBJ_CHECKERS(SCLPEventFacility, SCLPEventFacilityClass,
+ EVENT_FACILITY, TYPE_SCLP_EVENT_FACILITY)
struct SCLPEventFacilityClass {
SysBusDeviceClass parent_class;
diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-ccw.h
index f0f9695..2c807ee 100644
--- a/include/hw/s390x/s390-ccw.h
+++ b/include/hw/s390x/s390-ccw.h
@@ -19,12 +19,8 @@
#define TYPE_S390_CCW "s390-ccw"
typedef struct S390CCWDevice S390CCWDevice;
typedef struct S390CCWDeviceClass S390CCWDeviceClass;
-#define S390_CCW_DEVICE(obj) \
- OBJECT_CHECK(S390CCWDevice, (obj), TYPE_S390_CCW)
-#define S390_CCW_DEVICE_CLASS(klass) \
- OBJECT_CLASS_CHECK(S390CCWDeviceClass, (klass), TYPE_S390_CCW)
-#define S390_CCW_DEVICE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(S390CCWDeviceClass, (obj), TYPE_S390_CCW)
+DECLARE_OBJ_CHECKERS(S390CCWDevice, S390CCWDeviceClass,
+ S390_CCW_DEVICE, TYPE_S390_CCW)
struct S390CCWDevice {
CcwDevice parent_obj;
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index f20c503..54d14da 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -18,11 +18,9 @@
typedef struct S390CcwMachineClass S390CcwMachineClass;
typedef struct S390CcwMachineState S390CcwMachineState;
-#define S390_CCW_MACHINE(obj) \
- OBJECT_CHECK(S390CcwMachineState, (obj), TYPE_S390_CCW_MACHINE)
+DECLARE_OBJ_CHECKERS(S390CcwMachineState, S390CcwMachineClass,
+ S390_CCW_MACHINE, TYPE_S390_CCW_MACHINE)
-#define S390_CCW_MACHINE_CLASS(klass) \
- OBJECT_CLASS_CHECK(S390CcwMachineClass, (klass), TYPE_S390_CCW_MACHINE)
struct S390CcwMachineState {
/*< private >*/
diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h
index 2ae7cca..a6a1235 100644
--- a/include/hw/s390x/s390_flic.h
+++ b/include/hw/s390x/s390_flic.h
@@ -41,8 +41,8 @@ extern const VMStateDescription vmstate_adapter_routes;
#define TYPE_S390_FLIC_COMMON "s390-flic"
typedef struct S390FLICState S390FLICState;
typedef struct S390FLICStateClass S390FLICStateClass;
-#define S390_FLIC_COMMON(obj) \
- OBJECT_CHECK(S390FLICState, (obj), TYPE_S390_FLIC_COMMON)
+DECLARE_OBJ_CHECKERS(S390FLICState, S390FLICStateClass,
+ S390_FLIC_COMMON, TYPE_S390_FLIC_COMMON)
struct S390FLICState {
SysBusDevice parent_obj;
@@ -51,10 +51,6 @@ struct S390FLICState {
bool ais_supported;
};
-#define S390_FLIC_COMMON_CLASS(klass) \
- OBJECT_CLASS_CHECK(S390FLICStateClass, (klass), TYPE_S390_FLIC_COMMON)
-#define S390_FLIC_COMMON_GET_CLASS(obj) \
- OBJECT_GET_CLASS(S390FLICStateClass, (obj), TYPE_S390_FLIC_COMMON)
struct S390FLICStateClass {
DeviceClass parent_class;
@@ -79,13 +75,13 @@ struct S390FLICStateClass {
#define TYPE_KVM_S390_FLIC "s390-flic-kvm"
typedef struct KVMS390FLICState KVMS390FLICState;
-#define KVM_S390_FLIC(obj) \
- OBJECT_CHECK(KVMS390FLICState, (obj), TYPE_KVM_S390_FLIC)
+DECLARE_INSTANCE_CHECKER(KVMS390FLICState, KVM_S390_FLIC,
+ TYPE_KVM_S390_FLIC)
#define TYPE_QEMU_S390_FLIC "s390-flic-qemu"
typedef struct QEMUS390FLICState QEMUS390FLICState;
-#define QEMU_S390_FLIC(obj) \
- OBJECT_CHECK(QEMUS390FLICState, (obj), TYPE_QEMU_S390_FLIC)
+DECLARE_INSTANCE_CHECKER(QEMUS390FLICState, QEMU_S390_FLIC,
+ TYPE_QEMU_S390_FLIC)
#define SIC_IRQ_MODE_ALL 0
#define SIC_IRQ_MODE_SINGLE 1
diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h
index 2a5bdc6..5038a45 100644
--- a/include/hw/s390x/sclp.h
+++ b/include/hw/s390x/sclp.h
@@ -184,9 +184,8 @@ typedef struct SCCB {
#define TYPE_SCLP "sclp"
typedef struct SCLPDevice SCLPDevice;
typedef struct SCLPDeviceClass SCLPDeviceClass;
-#define SCLP(obj) OBJECT_CHECK(SCLPDevice, (obj), TYPE_SCLP)
-#define SCLP_CLASS(oc) OBJECT_CLASS_CHECK(SCLPDeviceClass, (oc), TYPE_SCLP)
-#define SCLP_GET_CLASS(obj) OBJECT_GET_CLASS(SCLPDeviceClass, (obj), TYPE_SCLP)
+DECLARE_OBJ_CHECKERS(SCLPDevice, SCLPDeviceClass,
+ SCLP, TYPE_SCLP)
struct SCLPEventFacility;
diff --git a/include/hw/s390x/storage-attributes.h b/include/hw/s390x/storage-attributes.h
index b5d9663..efb28c4 100644
--- a/include/hw/s390x/storage-attributes.h
+++ b/include/hw/s390x/storage-attributes.h
@@ -22,8 +22,8 @@
typedef struct S390StAttribClass S390StAttribClass;
typedef struct S390StAttribState S390StAttribState;
-#define S390_STATTRIB(obj) \
- OBJECT_CHECK(S390StAttribState, (obj), TYPE_S390_STATTRIB)
+DECLARE_OBJ_CHECKERS(S390StAttribState, S390StAttribClass,
+ S390_STATTRIB, TYPE_S390_STATTRIB)
struct S390StAttribState {
DeviceState parent_obj;
@@ -31,10 +31,6 @@ struct S390StAttribState {
bool migration_enabled;
};
-#define S390_STATTRIB_CLASS(klass) \
- OBJECT_CLASS_CHECK(S390StAttribClass, (klass), TYPE_S390_STATTRIB)
-#define S390_STATTRIB_GET_CLASS(obj) \
- OBJECT_GET_CLASS(S390StAttribClass, (obj), TYPE_S390_STATTRIB)
struct S390StAttribClass {
DeviceClass parent_class;
@@ -52,16 +48,16 @@ struct S390StAttribClass {
};
typedef struct QEMUS390StAttribState QEMUS390StAttribState;
-#define QEMU_S390_STATTRIB(obj) \
- OBJECT_CHECK(QEMUS390StAttribState, (obj), TYPE_QEMU_S390_STATTRIB)
+DECLARE_INSTANCE_CHECKER(QEMUS390StAttribState, QEMU_S390_STATTRIB,
+ TYPE_QEMU_S390_STATTRIB)
struct QEMUS390StAttribState {
S390StAttribState parent_obj;
};
typedef struct KVMS390StAttribState KVMS390StAttribState;
-#define KVM_S390_STATTRIB(obj) \
- OBJECT_CHECK(KVMS390StAttribState, (obj), TYPE_KVM_S390_STATTRIB)
+DECLARE_INSTANCE_CHECKER(KVMS390StAttribState, KVM_S390_STATTRIB,
+ TYPE_KVM_S390_STATTRIB)
struct KVMS390StAttribState {
S390StAttribState parent_obj;
diff --git a/include/hw/s390x/storage-keys.h b/include/hw/s390x/storage-keys.h
index e94a201..40f042f 100644
--- a/include/hw/s390x/storage-keys.h
+++ b/include/hw/s390x/storage-keys.h
@@ -19,8 +19,8 @@
#define TYPE_S390_SKEYS "s390-skeys"
typedef struct S390SKeysClass S390SKeysClass;
typedef struct S390SKeysState S390SKeysState;
-#define S390_SKEYS(obj) \
- OBJECT_CHECK(S390SKeysState, (obj), TYPE_S390_SKEYS)
+DECLARE_OBJ_CHECKERS(S390SKeysState, S390SKeysClass,
+ S390_SKEYS, TYPE_S390_SKEYS)
struct S390SKeysState {
DeviceState parent_obj;
@@ -28,10 +28,6 @@ struct S390SKeysState {
};
-#define S390_SKEYS_CLASS(klass) \
- OBJECT_CLASS_CHECK(S390SKeysClass, (klass), TYPE_S390_SKEYS)
-#define S390_SKEYS_GET_CLASS(obj) \
- OBJECT_GET_CLASS(S390SKeysClass, (obj), TYPE_S390_SKEYS)
struct S390SKeysClass {
DeviceClass parent_class;
@@ -45,8 +41,8 @@ struct S390SKeysClass {
#define TYPE_KVM_S390_SKEYS "s390-skeys-kvm"
#define TYPE_QEMU_S390_SKEYS "s390-skeys-qemu"
typedef struct QEMUS390SKeysState QEMUS390SKeysState;
-#define QEMU_S390_SKEYS(obj) \
- OBJECT_CHECK(QEMUS390SKeysState, (obj), TYPE_QEMU_S390_SKEYS)
+DECLARE_INSTANCE_CHECKER(QEMUS390SKeysState, QEMU_S390_SKEYS,
+ TYPE_QEMU_S390_SKEYS)
struct QEMUS390SKeysState {
S390SKeysState parent_obj;
diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h
index e240faf..c02498f 100644
--- a/include/hw/s390x/tod.h
+++ b/include/hw/s390x/tod.h
@@ -23,11 +23,8 @@ typedef struct S390TOD {
#define TYPE_S390_TOD "s390-tod"
typedef struct S390TODClass S390TODClass;
typedef struct S390TODState S390TODState;
-#define S390_TOD(obj) OBJECT_CHECK(S390TODState, (obj), TYPE_S390_TOD)
-#define S390_TOD_CLASS(oc) OBJECT_CLASS_CHECK(S390TODClass, (oc), \
- TYPE_S390_TOD)
-#define S390_TOD_GET_CLASS(obj) OBJECT_GET_CLASS(S390TODClass, (obj), \
- TYPE_S390_TOD)
+DECLARE_OBJ_CHECKERS(S390TODState, S390TODClass,
+ S390_TOD, TYPE_S390_TOD)
#define TYPE_KVM_S390_TOD TYPE_S390_TOD "-kvm"
#define TYPE_QEMU_S390_TOD TYPE_S390_TOD "-qemu"
diff --git a/include/hw/s390x/vfio-ccw.h b/include/hw/s390x/vfio-ccw.h
index 7bd4640..9c9c894 100644
--- a/include/hw/s390x/vfio-ccw.h
+++ b/include/hw/s390x/vfio-ccw.h
@@ -21,8 +21,8 @@
#define TYPE_VFIO_CCW "vfio-ccw"
typedef struct VFIOCCWDevice VFIOCCWDevice;
-#define VFIO_CCW(obj) \
- OBJECT_CHECK(VFIOCCWDevice, (obj), TYPE_VFIO_CCW)
+DECLARE_INSTANCE_CHECKER(VFIOCCWDevice, VFIO_CCW,
+ TYPE_VFIO_CCW)
#define TYPE_VFIO_CCW "vfio-ccw"