From 8063396bf3459a810d24e3efd6110b8480f0de5b Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:19 -0400 Subject: Use OBJECT_DECLARE_SIMPLE_TYPE when possible This converts existing DECLARE_INSTANCE_CHECKER usage to OBJECT_DECLARE_SIMPLE_TYPE when possible. $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost Acked-by: Paul Durrant Message-Id: <20200916182519.415636-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- include/hw/s390x/css-bridge.h | 8 ++------ include/hw/s390x/s390_flic.h | 4 +--- include/hw/s390x/vfio-ccw.h | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-) (limited to 'include/hw/s390x') diff --git a/include/hw/s390x/css-bridge.h b/include/hw/s390x/css-bridge.h index 9fd4484204..deb606d71f 100644 --- a/include/hw/s390x/css-bridge.h +++ b/include/hw/s390x/css-bridge.h @@ -21,21 +21,17 @@ struct VirtualCssBridge { SysBusDevice sysbus_dev; bool css_dev_path; }; -typedef struct VirtualCssBridge VirtualCssBridge; #define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" -DECLARE_INSTANCE_CHECKER(VirtualCssBridge, VIRTUAL_CSS_BRIDGE, - TYPE_VIRTUAL_CSS_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(VirtualCssBridge, VIRTUAL_CSS_BRIDGE) /* virtual css bus type */ struct VirtualCssBus { BusState parent_obj; }; -typedef struct VirtualCssBus VirtualCssBus; #define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus" -DECLARE_INSTANCE_CHECKER(VirtualCssBus, VIRTUAL_CSS_BUS, - TYPE_VIRTUAL_CSS_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(VirtualCssBus, VIRTUAL_CSS_BUS) VirtualCssBus *virtual_css_bus_init(void); #endif diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h index 648ae793a1..e91b15d2d6 100644 --- a/include/hw/s390x/s390_flic.h +++ b/include/hw/s390x/s390_flic.h @@ -77,9 +77,7 @@ DECLARE_INSTANCE_CHECKER(KVMS390FLICState, KVM_S390_FLIC, TYPE_KVM_S390_FLIC) #define TYPE_QEMU_S390_FLIC "s390-flic-qemu" -typedef struct QEMUS390FLICState QEMUS390FLICState; -DECLARE_INSTANCE_CHECKER(QEMUS390FLICState, QEMU_S390_FLIC, - TYPE_QEMU_S390_FLIC) +OBJECT_DECLARE_SIMPLE_TYPE(QEMUS390FLICState, QEMU_S390_FLIC) #define SIC_IRQ_MODE_ALL 0 #define SIC_IRQ_MODE_SINGLE 1 diff --git a/include/hw/s390x/vfio-ccw.h b/include/hw/s390x/vfio-ccw.h index 9c9c8944ad..63a909eb7e 100644 --- a/include/hw/s390x/vfio-ccw.h +++ b/include/hw/s390x/vfio-ccw.h @@ -20,9 +20,7 @@ #include "qom/object.h" #define TYPE_VFIO_CCW "vfio-ccw" -typedef struct VFIOCCWDevice VFIOCCWDevice; -DECLARE_INSTANCE_CHECKER(VFIOCCWDevice, VFIO_CCW, - TYPE_VFIO_CCW) +OBJECT_DECLARE_SIMPLE_TYPE(VFIOCCWDevice, VFIO_CCW) #define TYPE_VFIO_CCW "vfio-ccw" -- cgit v1.2.3