aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/authz/base.h6
-rw-r--r--include/authz/list.h6
-rw-r--r--include/authz/listfile.h6
-rw-r--r--include/authz/pamacct.h6
-rw-r--r--include/authz/simple.h6
-rw-r--r--include/crypto/secret_common.h6
-rw-r--r--include/crypto/secret_keyring.h6
-rw-r--r--include/hw/arm/armsse.h6
-rw-r--r--include/hw/hyperv/vmbus.h6
-rw-r--r--include/hw/i2c/i2c.h6
-rw-r--r--include/hw/i2c/smbus_slave.h6
-rw-r--r--include/hw/ipack/ipack.h6
-rw-r--r--include/hw/ipmi/ipmi.h6
-rw-r--r--include/hw/mem/pc-dimm.h6
-rw-r--r--include/hw/ppc/pnv.h6
-rw-r--r--include/hw/ppc/pnv_core.h6
-rw-r--r--include/hw/ppc/pnv_homer.h6
-rw-r--r--include/hw/ppc/pnv_occ.h6
-rw-r--r--include/hw/ppc/pnv_psi.h6
-rw-r--r--include/hw/ppc/pnv_xive.h6
-rw-r--r--include/hw/ppc/spapr_cpu_core.h6
-rw-r--r--include/hw/ppc/spapr_vio.h6
-rw-r--r--include/hw/ppc/xics.h6
-rw-r--r--include/hw/ppc/xive.h6
-rw-r--r--include/hw/s390x/event-facility.h6
-rw-r--r--include/hw/s390x/s390_flic.h6
-rw-r--r--include/hw/s390x/sclp.h6
-rw-r--r--include/hw/sd/sd.h6
-rw-r--r--include/hw/ssi/ssi.h6
-rw-r--r--include/hw/sysbus.h6
-rw-r--r--include/hw/virtio/virtio-gpu.h6
-rw-r--r--include/hw/virtio/virtio-input.h6
-rw-r--r--include/hw/virtio/virtio-mem.h6
-rw-r--r--include/hw/virtio/virtio-pmem.h6
-rw-r--r--include/hw/virtio/virtio-serial.h6
-rw-r--r--include/hw/xen/xen-bus.h6
-rw-r--r--include/io/channel.h6
-rw-r--r--include/io/dns-resolver.h6
-rw-r--r--include/io/net-listener.h6
-rw-r--r--include/scsi/pr-manager.h6
-rw-r--r--include/sysemu/cryptodev.h6
-rw-r--r--include/sysemu/hostmem.h6
-rw-r--r--include/sysemu/rng.h6
-rw-r--r--include/sysemu/tpm_backend.h6
-rw-r--r--include/sysemu/vhost-user-backend.h6
45 files changed, 90 insertions, 180 deletions
diff --git a/include/authz/base.h b/include/authz/base.h
index 8d8cf9fa5a..06b5e29f6f 100644
--- a/include/authz/base.h
+++ b/include/authz/base.h
@@ -27,10 +27,8 @@
#define TYPE_QAUTHZ "authz"
-typedef struct QAuthZ QAuthZ;
-typedef struct QAuthZClass QAuthZClass;
-DECLARE_OBJ_CHECKERS(QAuthZ, QAuthZClass,
- QAUTHZ, TYPE_QAUTHZ)
+OBJECT_DECLARE_TYPE(QAuthZ, QAuthZClass,
+ qauthz, QAUTHZ)
/**
diff --git a/include/authz/list.h b/include/authz/list.h
index 93d16876bc..e4e1040472 100644
--- a/include/authz/list.h
+++ b/include/authz/list.h
@@ -27,10 +27,8 @@
#define TYPE_QAUTHZ_LIST "authz-list"
-typedef struct QAuthZList QAuthZList;
-typedef struct QAuthZListClass QAuthZListClass;
-DECLARE_OBJ_CHECKERS(QAuthZList, QAuthZListClass,
- QAUTHZ_LIST, TYPE_QAUTHZ_LIST)
+OBJECT_DECLARE_TYPE(QAuthZList, QAuthZListClass,
+ qauthz_list, QAUTHZ_LIST)
diff --git a/include/authz/listfile.h b/include/authz/listfile.h
index 2e4a629b6d..89c5eafbfa 100644
--- a/include/authz/listfile.h
+++ b/include/authz/listfile.h
@@ -27,10 +27,8 @@
#define TYPE_QAUTHZ_LIST_FILE "authz-list-file"
-typedef struct QAuthZListFile QAuthZListFile;
-typedef struct QAuthZListFileClass QAuthZListFileClass;
-DECLARE_OBJ_CHECKERS(QAuthZListFile, QAuthZListFileClass,
- QAUTHZ_LIST_FILE, TYPE_QAUTHZ_LIST_FILE)
+OBJECT_DECLARE_TYPE(QAuthZListFile, QAuthZListFileClass,
+ qauthz_list_file, QAUTHZ_LIST_FILE)
diff --git a/include/authz/pamacct.h b/include/authz/pamacct.h
index 98454ddc25..44bb5ff28d 100644
--- a/include/authz/pamacct.h
+++ b/include/authz/pamacct.h
@@ -27,10 +27,8 @@
#define TYPE_QAUTHZ_PAM "authz-pam"
-typedef struct QAuthZPAM QAuthZPAM;
-typedef struct QAuthZPAMClass QAuthZPAMClass;
-DECLARE_OBJ_CHECKERS(QAuthZPAM, QAuthZPAMClass,
- QAUTHZ_PAM, TYPE_QAUTHZ_PAM)
+OBJECT_DECLARE_TYPE(QAuthZPAM, QAuthZPAMClass,
+ qauthz_pam, QAUTHZ_PAM)
diff --git a/include/authz/simple.h b/include/authz/simple.h
index 7a896fb94b..ba4a5ec5ea 100644
--- a/include/authz/simple.h
+++ b/include/authz/simple.h
@@ -26,10 +26,8 @@
#define TYPE_QAUTHZ_SIMPLE "authz-simple"
-typedef struct QAuthZSimple QAuthZSimple;
-typedef struct QAuthZSimpleClass QAuthZSimpleClass;
-DECLARE_OBJ_CHECKERS(QAuthZSimple, QAuthZSimpleClass,
- QAUTHZ_SIMPLE, TYPE_QAUTHZ_SIMPLE)
+OBJECT_DECLARE_TYPE(QAuthZSimple, QAuthZSimpleClass,
+ qauthz_simple, QAUTHZ_SIMPLE)
diff --git a/include/crypto/secret_common.h b/include/crypto/secret_common.h
index dd3310ea5f..daf00c3b2a 100644
--- a/include/crypto/secret_common.h
+++ b/include/crypto/secret_common.h
@@ -25,10 +25,8 @@
#include "qom/object.h"
#define TYPE_QCRYPTO_SECRET_COMMON "secret_common"
-typedef struct QCryptoSecretCommon QCryptoSecretCommon;
-typedef struct QCryptoSecretCommonClass QCryptoSecretCommonClass;
-DECLARE_OBJ_CHECKERS(QCryptoSecretCommon, QCryptoSecretCommonClass,
- QCRYPTO_SECRET_COMMON, TYPE_QCRYPTO_SECRET_COMMON)
+OBJECT_DECLARE_TYPE(QCryptoSecretCommon, QCryptoSecretCommonClass,
+ qcrypto_secret_common, QCRYPTO_SECRET_COMMON)
struct QCryptoSecretCommon {
diff --git a/include/crypto/secret_keyring.h b/include/crypto/secret_keyring.h
index 9875f4cbf3..cc2c7397db 100644
--- a/include/crypto/secret_keyring.h
+++ b/include/crypto/secret_keyring.h
@@ -26,10 +26,8 @@
#include "crypto/secret_common.h"
#define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring"
-typedef struct QCryptoSecretKeyring QCryptoSecretKeyring;
-typedef struct QCryptoSecretKeyringClass QCryptoSecretKeyringClass;
-DECLARE_OBJ_CHECKERS(QCryptoSecretKeyring, QCryptoSecretKeyringClass,
- QCRYPTO_SECRET_KEYRING, TYPE_QCRYPTO_SECRET_KEYRING)
+OBJECT_DECLARE_TYPE(QCryptoSecretKeyring, QCryptoSecretKeyringClass,
+ qcrypto_secret_keyring, QCRYPTO_SECRET_KEYRING)
struct QCryptoSecretKeyring {
diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h
index 452cbb5793..b844ef6bc0 100644
--- a/include/hw/arm/armsse.h
+++ b/include/hw/arm/armsse.h
@@ -108,10 +108,8 @@
#include "qom/object.h"
#define TYPE_ARM_SSE "arm-sse"
-typedef struct ARMSSE ARMSSE;
-typedef struct ARMSSEClass ARMSSEClass;
-DECLARE_OBJ_CHECKERS(ARMSSE, ARMSSEClass,
- ARM_SSE, TYPE_ARM_SSE)
+OBJECT_DECLARE_TYPE(ARMSSE, ARMSSEClass,
+ arm_sse, ARM_SSE)
/*
* These type names are for specific IoTKit subsystems; other than
diff --git a/include/hw/hyperv/vmbus.h b/include/hw/hyperv/vmbus.h
index 0fe3d3b47c..00ad8798c1 100644
--- a/include/hw/hyperv/vmbus.h
+++ b/include/hw/hyperv/vmbus.h
@@ -20,10 +20,8 @@
#define TYPE_VMBUS_DEVICE "vmbus-dev"
-typedef struct VMBusDevice VMBusDevice;
-typedef struct VMBusDeviceClass VMBusDeviceClass;
-DECLARE_OBJ_CHECKERS(VMBusDevice, VMBusDeviceClass,
- VMBUS_DEVICE, TYPE_VMBUS_DEVICE)
+OBJECT_DECLARE_TYPE(VMBusDevice, VMBusDeviceClass,
+ vmbus_device, VMBUS_DEVICE)
#define TYPE_VMBUS "vmbus"
typedef struct VMBus VMBus;
diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index 2074f7c971..5b8eef62c6 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -16,12 +16,10 @@ enum i2c_event {
I2C_NACK /* Masker NACKed a receive byte. */
};
-typedef struct I2CSlave I2CSlave;
#define TYPE_I2C_SLAVE "i2c-slave"
-typedef struct I2CSlaveClass I2CSlaveClass;
-DECLARE_OBJ_CHECKERS(I2CSlave, I2CSlaveClass,
- I2C_SLAVE, TYPE_I2C_SLAVE)
+OBJECT_DECLARE_TYPE(I2CSlave, I2CSlaveClass,
+ i2c_slave, I2C_SLAVE)
struct I2CSlaveClass {
DeviceClass parent_class;
diff --git a/include/hw/i2c/smbus_slave.h b/include/hw/i2c/smbus_slave.h
index 8d16e4bcd9..cb9cb372f9 100644
--- a/include/hw/i2c/smbus_slave.h
+++ b/include/hw/i2c/smbus_slave.h
@@ -29,10 +29,8 @@
#include "qom/object.h"
#define TYPE_SMBUS_DEVICE "smbus-device"
-typedef struct SMBusDevice SMBusDevice;
-typedef struct SMBusDeviceClass SMBusDeviceClass;
-DECLARE_OBJ_CHECKERS(SMBusDevice, SMBusDeviceClass,
- SMBUS_DEVICE, TYPE_SMBUS_DEVICE)
+OBJECT_DECLARE_TYPE(SMBusDevice, SMBusDeviceClass,
+ smbus_device, SMBUS_DEVICE)
struct SMBusDeviceClass {
diff --git a/include/hw/ipack/ipack.h b/include/hw/ipack/ipack.h
index a2304c1b3e..a59a487853 100644
--- a/include/hw/ipack/ipack.h
+++ b/include/hw/ipack/ipack.h
@@ -30,12 +30,10 @@ struct IPackBus {
qemu_irq_handler set_irq;
};
-typedef struct IPackDevice IPackDevice;
-typedef struct IPackDeviceClass IPackDeviceClass;
#define TYPE_IPACK_DEVICE "ipack-device"
-DECLARE_OBJ_CHECKERS(IPackDevice, IPackDeviceClass,
- IPACK_DEVICE, TYPE_IPACK_DEVICE)
+OBJECT_DECLARE_TYPE(IPackDevice, IPackDeviceClass,
+ ipack_device, IPACK_DEVICE)
struct IPackDeviceClass {
/*< private >*/
diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h
index 01c9d497c4..3fa5a4abd0 100644
--- a/include/hw/ipmi/ipmi.h
+++ b/include/hw/ipmi/ipmi.h
@@ -176,10 +176,8 @@ struct IPMIInterfaceClass {
* Define a BMC simulator (or perhaps a connection to a real BMC)
*/
#define TYPE_IPMI_BMC "ipmi-bmc"
-typedef struct IPMIBmc IPMIBmc;
-typedef struct IPMIBmcClass IPMIBmcClass;
-DECLARE_OBJ_CHECKERS(IPMIBmc, IPMIBmcClass,
- IPMI_BMC, TYPE_IPMI_BMC)
+OBJECT_DECLARE_TYPE(IPMIBmc, IPMIBmcClass,
+ ipmi_bmc, IPMI_BMC)
struct IPMIBmc {
DeviceState parent;
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index 86e3010243..1d570defc9 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -21,10 +21,8 @@
#include "qom/object.h"
#define TYPE_PC_DIMM "pc-dimm"
-typedef struct PCDIMMDevice PCDIMMDevice;
-typedef struct PCDIMMDeviceClass PCDIMMDeviceClass;
-DECLARE_OBJ_CHECKERS(PCDIMMDevice, PCDIMMDeviceClass,
- PC_DIMM, TYPE_PC_DIMM)
+OBJECT_DECLARE_TYPE(PCDIMMDevice, PCDIMMDeviceClass,
+ pc_dimm, PC_DIMM)
#define PC_DIMM_ADDR_PROP "addr"
#define PC_DIMM_SLOT_PROP "slot"
diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h
index f3bacb6a5c..b4b2b24d80 100644
--- a/include/hw/ppc/pnv.h
+++ b/include/hw/ppc/pnv.h
@@ -35,10 +35,8 @@
#include "qom/object.h"
#define TYPE_PNV_CHIP "pnv-chip"
-typedef struct PnvChip PnvChip;
-typedef struct PnvChipClass PnvChipClass;
-DECLARE_OBJ_CHECKERS(PnvChip, PnvChipClass,
- PNV_CHIP, TYPE_PNV_CHIP)
+OBJECT_DECLARE_TYPE(PnvChip, PnvChipClass,
+ pnv_chip, PNV_CHIP)
struct PnvChip {
/*< private >*/
diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h
index fd17a236e3..5cb22c2fa9 100644
--- a/include/hw/ppc/pnv_core.h
+++ b/include/hw/ppc/pnv_core.h
@@ -25,10 +25,8 @@
#include "qom/object.h"
#define TYPE_PNV_CORE "powernv-cpu-core"
-typedef struct PnvCore PnvCore;
-typedef struct PnvCoreClass PnvCoreClass;
-DECLARE_OBJ_CHECKERS(PnvCore, PnvCoreClass,
- PNV_CORE, TYPE_PNV_CORE)
+OBJECT_DECLARE_TYPE(PnvCore, PnvCoreClass,
+ pnv_core, PNV_CORE)
typedef struct PnvChip PnvChip;
diff --git a/include/hw/ppc/pnv_homer.h b/include/hw/ppc/pnv_homer.h
index 7aadcab03c..0978812713 100644
--- a/include/hw/ppc/pnv_homer.h
+++ b/include/hw/ppc/pnv_homer.h
@@ -24,10 +24,8 @@
#include "qom/object.h"
#define TYPE_PNV_HOMER "pnv-homer"
-typedef struct PnvHomer PnvHomer;
-typedef struct PnvHomerClass PnvHomerClass;
-DECLARE_OBJ_CHECKERS(PnvHomer, PnvHomerClass,
- PNV_HOMER, TYPE_PNV_HOMER)
+OBJECT_DECLARE_TYPE(PnvHomer, PnvHomerClass,
+ pnv_homer, PNV_HOMER)
#define TYPE_PNV8_HOMER TYPE_PNV_HOMER "-POWER8"
DECLARE_INSTANCE_CHECKER(PnvHomer, PNV8_HOMER,
TYPE_PNV8_HOMER)
diff --git a/include/hw/ppc/pnv_occ.h b/include/hw/ppc/pnv_occ.h
index 4fcfb32417..b79e3440be 100644
--- a/include/hw/ppc/pnv_occ.h
+++ b/include/hw/ppc/pnv_occ.h
@@ -24,10 +24,8 @@
#include "qom/object.h"
#define TYPE_PNV_OCC "pnv-occ"
-typedef struct PnvOCC PnvOCC;
-typedef struct PnvOCCClass PnvOCCClass;
-DECLARE_OBJ_CHECKERS(PnvOCC, PnvOCCClass,
- PNV_OCC, TYPE_PNV_OCC)
+OBJECT_DECLARE_TYPE(PnvOCC, PnvOCCClass,
+ pnv_occ, PNV_OCC)
#define TYPE_PNV8_OCC TYPE_PNV_OCC "-POWER8"
DECLARE_INSTANCE_CHECKER(PnvOCC, PNV8_OCC,
TYPE_PNV8_OCC)
diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h
index a33195df17..0034db44c3 100644
--- a/include/hw/ppc/pnv_psi.h
+++ b/include/hw/ppc/pnv_psi.h
@@ -26,10 +26,8 @@
#include "qom/object.h"
#define TYPE_PNV_PSI "pnv-psi"
-typedef struct PnvPsi PnvPsi;
-typedef struct PnvPsiClass PnvPsiClass;
-DECLARE_OBJ_CHECKERS(PnvPsi, PnvPsiClass,
- PNV_PSI, TYPE_PNV_PSI)
+OBJECT_DECLARE_TYPE(PnvPsi, PnvPsiClass,
+ pnv_psi, PNV_PSI)
#define PSIHB_XSCOM_MAX 0x20
diff --git a/include/hw/ppc/pnv_xive.h b/include/hw/ppc/pnv_xive.h
index a014e2a726..29d5debd1c 100644
--- a/include/hw/ppc/pnv_xive.h
+++ b/include/hw/ppc/pnv_xive.h
@@ -16,10 +16,8 @@
struct PnvChip;
#define TYPE_PNV_XIVE "pnv-xive"
-typedef struct PnvXive PnvXive;
-typedef struct PnvXiveClass PnvXiveClass;
-DECLARE_OBJ_CHECKERS(PnvXive, PnvXiveClass,
- PNV_XIVE, TYPE_PNV_XIVE)
+OBJECT_DECLARE_TYPE(PnvXive, PnvXiveClass,
+ pnv_xive, PNV_XIVE)
#define XIVE_BLOCK_MAX 16
diff --git a/include/hw/ppc/spapr_cpu_core.h b/include/hw/ppc/spapr_cpu_core.h
index fba6a01050..4022917168 100644
--- a/include/hw/ppc/spapr_cpu_core.h
+++ b/include/hw/ppc/spapr_cpu_core.h
@@ -16,10 +16,8 @@
#include "qom/object.h"
#define TYPE_SPAPR_CPU_CORE "spapr-cpu-core"
-typedef struct SpaprCpuCore SpaprCpuCore;
-typedef struct SpaprCpuCoreClass SpaprCpuCoreClass;
-DECLARE_OBJ_CHECKERS(SpaprCpuCore, SpaprCpuCoreClass,
- SPAPR_CPU_CORE, TYPE_SPAPR_CPU_CORE)
+OBJECT_DECLARE_TYPE(SpaprCpuCore, SpaprCpuCoreClass,
+ spapr_cpu_core, SPAPR_CPU_CORE)
#define SPAPR_CPU_CORE_TYPE_NAME(model) model "-" TYPE_SPAPR_CPU_CORE
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index e289028634..6c40da72ff 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -28,10 +28,8 @@
#include "qom/object.h"
#define TYPE_VIO_SPAPR_DEVICE "vio-spapr-device"
-typedef struct SpaprVioDevice SpaprVioDevice;
-typedef struct SpaprVioDeviceClass SpaprVioDeviceClass;
-DECLARE_OBJ_CHECKERS(SpaprVioDevice, SpaprVioDeviceClass,
- VIO_SPAPR_DEVICE, TYPE_VIO_SPAPR_DEVICE)
+OBJECT_DECLARE_TYPE(SpaprVioDevice, SpaprVioDeviceClass,
+ vio_spapr_device, VIO_SPAPR_DEVICE)
#define TYPE_SPAPR_VIO_BUS "spapr-vio-bus"
typedef struct SpaprVioBus SpaprVioBus;
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index bcb584b90d..c5a3cdcadc 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -41,8 +41,6 @@
* (the kernel implementation supports more but we don't exploit
* that yet)
*/
-typedef struct ICPStateClass ICPStateClass;
-typedef struct ICPState ICPState;
typedef struct PnvICPState PnvICPState;
typedef struct ICSStateClass ICSStateClass;
typedef struct ICSState ICSState;
@@ -50,8 +48,8 @@ typedef struct ICSIRQState ICSIRQState;
typedef struct XICSFabric XICSFabric;
#define TYPE_ICP "icp"
-DECLARE_OBJ_CHECKERS(ICPState, ICPStateClass,
- ICP, TYPE_ICP)
+OBJECT_DECLARE_TYPE(ICPState, ICPStateClass,
+ icp, ICP)
#define TYPE_PNV_ICP "pnv-icp"
DECLARE_INSTANCE_CHECKER(PnvICPState, PNV_ICP,
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 48595ab641..482fafccfd 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -345,12 +345,10 @@ struct XiveRouter {
XiveFabric *xfb;
};
-typedef struct XiveRouter XiveRouter;
#define TYPE_XIVE_ROUTER "xive-router"
-typedef struct XiveRouterClass XiveRouterClass;
-DECLARE_OBJ_CHECKERS(XiveRouter, XiveRouterClass,
- XIVE_ROUTER, TYPE_XIVE_ROUTER)
+OBJECT_DECLARE_TYPE(XiveRouter, XiveRouterClass,
+ xive_router, XIVE_ROUTER)
struct XiveRouterClass {
SysBusDeviceClass parent;
diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h
index eccf6e924b..051c1c6576 100644
--- a/include/hw/s390x/event-facility.h
+++ b/include/hw/s390x/event-facility.h
@@ -42,10 +42,8 @@
#define SCLP_SELECTIVE_READ 0x01
#define TYPE_SCLP_EVENT "s390-sclp-event-type"
-typedef struct SCLPEvent SCLPEvent;
-typedef struct SCLPEventClass SCLPEventClass;
-DECLARE_OBJ_CHECKERS(SCLPEvent, SCLPEventClass,
- SCLP_EVENT, TYPE_SCLP_EVENT)
+OBJECT_DECLARE_TYPE(SCLPEvent, SCLPEventClass,
+ sclp_event, SCLP_EVENT)
#define TYPE_SCLP_CPU_HOTPLUG "sclp-cpu-hotplug"
#define TYPE_SCLP_QUIESCE "sclpquiesce"
diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h
index a6a123598d..4b718c8ebf 100644
--- a/include/hw/s390x/s390_flic.h
+++ b/include/hw/s390x/s390_flic.h
@@ -39,10 +39,8 @@ extern const VMStateDescription vmstate_adapter_routes;
VMSTATE_STRUCT(_f, _s, 1, vmstate_adapter_routes, AdapterRoutes)
#define TYPE_S390_FLIC_COMMON "s390-flic"
-typedef struct S390FLICState S390FLICState;
-typedef struct S390FLICStateClass S390FLICStateClass;
-DECLARE_OBJ_CHECKERS(S390FLICState, S390FLICStateClass,
- S390_FLIC_COMMON, TYPE_S390_FLIC_COMMON)
+OBJECT_DECLARE_TYPE(S390FLICState, S390FLICStateClass,
+ s390_flic_common, S390_FLIC_COMMON)
struct S390FLICState {
SysBusDevice parent_obj;
diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h
index 5038a45612..e9f0f7e67c 100644
--- a/include/hw/s390x/sclp.h
+++ b/include/hw/s390x/sclp.h
@@ -182,10 +182,8 @@ typedef struct SCCB {
} QEMU_PACKED SCCB;
#define TYPE_SCLP "sclp"
-typedef struct SCLPDevice SCLPDevice;
-typedef struct SCLPDeviceClass SCLPDeviceClass;
-DECLARE_OBJ_CHECKERS(SCLPDevice, SCLPDeviceClass,
- SCLP, TYPE_SCLP)
+OBJECT_DECLARE_TYPE(SCLPDevice, SCLPDeviceClass,
+ sclp, SCLP)
struct SCLPEventFacility;
diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
index 31ccbeab0e..54f97a07cd 100644
--- a/include/hw/sd/sd.h
+++ b/include/hw/sd/sd.h
@@ -90,7 +90,6 @@ typedef struct {
} SDRequest;
typedef struct SDState SDState;
-typedef struct SDBus SDBus;
#define TYPE_SD_CARD "sd-card"
typedef struct SDCardClass SDCardClass;
@@ -130,9 +129,8 @@ struct SDCardClass {
};
#define TYPE_SD_BUS "sd-bus"
-typedef struct SDBusClass SDBusClass;
-DECLARE_OBJ_CHECKERS(SDBus, SDBusClass,
- SD_BUS, TYPE_SD_BUS)
+OBJECT_DECLARE_TYPE(SDBus, SDBusClass,
+ sd_bus, SD_BUS)
struct SDBus {
BusState qbus;
diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h
index b9286989fc..4fe1d85136 100644
--- a/include/hw/ssi/ssi.h
+++ b/include/hw/ssi/ssi.h
@@ -14,13 +14,11 @@
#include "hw/qdev-core.h"
#include "qom/object.h"
-typedef struct SSISlave SSISlave;
-typedef struct SSISlaveClass SSISlaveClass;
typedef enum SSICSMode SSICSMode;
#define TYPE_SSI_SLAVE "ssi-slave"
-DECLARE_OBJ_CHECKERS(SSISlave, SSISlaveClass,
- SSI_SLAVE, TYPE_SSI_SLAVE)
+OBJECT_DECLARE_TYPE(SSISlave, SSISlaveClass,
+ ssi_slave, SSI_SLAVE)
#define SSI_GPIO_CS "ssi-gpio-cs"
diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h
index 77e21bba18..28a9b0f634 100644
--- a/include/hw/sysbus.h
+++ b/include/hw/sysbus.h
@@ -14,12 +14,10 @@
DECLARE_INSTANCE_CHECKER(BusState, SYSTEM_BUS,
TYPE_SYSTEM_BUS)
-typedef struct SysBusDevice SysBusDevice;
#define TYPE_SYS_BUS_DEVICE "sys-bus-device"
-typedef struct SysBusDeviceClass SysBusDeviceClass;
-DECLARE_OBJ_CHECKERS(SysBusDevice, SysBusDeviceClass,
- SYS_BUS_DEVICE, TYPE_SYS_BUS_DEVICE)
+OBJECT_DECLARE_TYPE(SysBusDevice, SysBusDeviceClass,
+ sys_bus_device, SYS_BUS_DEVICE)
/**
* SysBusDeviceClass:
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 72f8689e2e..f334b78085 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -25,10 +25,8 @@
#include "qom/object.h"
#define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base"
-typedef struct VirtIOGPUBase VirtIOGPUBase;
-typedef struct VirtIOGPUBaseClass VirtIOGPUBaseClass;
-DECLARE_OBJ_CHECKERS(VirtIOGPUBase, VirtIOGPUBaseClass,
- VIRTIO_GPU_BASE, TYPE_VIRTIO_GPU_BASE)
+OBJECT_DECLARE_TYPE(VirtIOGPUBase, VirtIOGPUBaseClass,
+ virtio_gpu_base, VIRTIO_GPU_BASE)
#define TYPE_VIRTIO_GPU "virtio-gpu-device"
typedef struct VirtIOGPU VirtIOGPU;
diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-input.h
index c54aa6aa72..5eb9e7745e 100644
--- a/include/hw/virtio/virtio-input.h
+++ b/include/hw/virtio/virtio-input.h
@@ -19,10 +19,8 @@ typedef struct virtio_input_event virtio_input_event;
/* qemu internals */
#define TYPE_VIRTIO_INPUT "virtio-input-device"
-typedef struct VirtIOInput VirtIOInput;
-typedef struct VirtIOInputClass VirtIOInputClass;
-DECLARE_OBJ_CHECKERS(VirtIOInput, VirtIOInputClass,
- VIRTIO_INPUT, TYPE_VIRTIO_INPUT)
+OBJECT_DECLARE_TYPE(VirtIOInput, VirtIOInputClass,
+ virtio_input, VIRTIO_INPUT)
#define VIRTIO_INPUT_GET_PARENT_CLASS(obj) \
OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT)
diff --git a/include/hw/virtio/virtio-mem.h b/include/hw/virtio/virtio-mem.h
index 5f0b81a967..dfc72e14b1 100644
--- a/include/hw/virtio/virtio-mem.h
+++ b/include/hw/virtio/virtio-mem.h
@@ -21,10 +21,8 @@
#define TYPE_VIRTIO_MEM "virtio-mem"
-typedef struct VirtIOMEM VirtIOMEM;
-typedef struct VirtIOMEMClass VirtIOMEMClass;
-DECLARE_OBJ_CHECKERS(VirtIOMEM, VirtIOMEMClass,
- VIRTIO_MEM, TYPE_VIRTIO_MEM)
+OBJECT_DECLARE_TYPE(VirtIOMEM, VirtIOMEMClass,
+ virtio_mem, VIRTIO_MEM)
#define VIRTIO_MEM_MEMDEV_PROP "memdev"
#define VIRTIO_MEM_NODE_PROP "node"
diff --git a/include/hw/virtio/virtio-pmem.h b/include/hw/virtio/virtio-pmem.h
index 6c15abad70..56df9a03ce 100644
--- a/include/hw/virtio/virtio-pmem.h
+++ b/include/hw/virtio/virtio-pmem.h
@@ -20,10 +20,8 @@
#define TYPE_VIRTIO_PMEM "virtio-pmem"
-typedef struct VirtIOPMEM VirtIOPMEM;
-typedef struct VirtIOPMEMClass VirtIOPMEMClass;
-DECLARE_OBJ_CHECKERS(VirtIOPMEM, VirtIOPMEMClass,
- VIRTIO_PMEM, TYPE_VIRTIO_PMEM)
+OBJECT_DECLARE_TYPE(VirtIOPMEM, VirtIOPMEMClass,
+ virtio_pmem, VIRTIO_PMEM)
#define VIRTIO_PMEM_ADDR_PROP "memaddr"
#define VIRTIO_PMEM_MEMDEV_PROP "memdev"
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index bbc76d5032..0b7f963611 100644
--- a/include/hw/virtio/virtio-serial.h
+++ b/include/hw/virtio/virtio-serial.h
@@ -26,10 +26,8 @@ struct virtio_serial_conf {
};
#define TYPE_VIRTIO_SERIAL_PORT "virtio-serial-port"
-typedef struct VirtIOSerialPort VirtIOSerialPort;
-typedef struct VirtIOSerialPortClass VirtIOSerialPortClass;
-DECLARE_OBJ_CHECKERS(VirtIOSerialPort, VirtIOSerialPortClass,
- VIRTIO_SERIAL_PORT, TYPE_VIRTIO_SERIAL_PORT)
+OBJECT_DECLARE_TYPE(VirtIOSerialPort, VirtIOSerialPortClass,
+ virtio_serial_port, VIRTIO_SERIAL_PORT)
typedef struct VirtIOSerial VirtIOSerial;
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 35fec7c905..e0e67505b8 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -71,17 +71,15 @@ struct XenBus {
XenWatch *backend_watch;
QLIST_HEAD(, XenDevice) inactive_devices;
};
-typedef struct XenBus XenBus;
struct XenBusClass {
/*< private >*/
BusClass parent_class;
};
-typedef struct XenBusClass XenBusClass;
#define TYPE_XEN_BUS "xen-bus"
-DECLARE_OBJ_CHECKERS(XenBus, XenBusClass,
- XEN_BUS, TYPE_XEN_BUS)
+OBJECT_DECLARE_TYPE(XenBus, XenBusClass,
+ xen_bus, XEN_BUS)
void xen_bus_init(void);
diff --git a/include/io/channel.h b/include/io/channel.h
index 3ebdc7954f..245479548a 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -26,10 +26,8 @@
#include "block/aio.h"
#define TYPE_QIO_CHANNEL "qio-channel"
-typedef struct QIOChannel QIOChannel;
-typedef struct QIOChannelClass QIOChannelClass;
-DECLARE_OBJ_CHECKERS(QIOChannel, QIOChannelClass,
- QIO_CHANNEL, TYPE_QIO_CHANNEL)
+OBJECT_DECLARE_TYPE(QIOChannel, QIOChannelClass,
+ qio_channel, QIO_CHANNEL)
#define QIO_CHANNEL_ERR_BLOCK -2
diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h
index 96a3186b6b..8ae4857e05 100644
--- a/include/io/dns-resolver.h
+++ b/include/io/dns-resolver.h
@@ -26,10 +26,8 @@
#include "io/task.h"
#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"
-typedef struct QIODNSResolver QIODNSResolver;
-typedef struct QIODNSResolverClass QIODNSResolverClass;
-DECLARE_OBJ_CHECKERS(QIODNSResolver, QIODNSResolverClass,
- QIO_DNS_RESOLVER, TYPE_QIO_DNS_RESOLVER)
+OBJECT_DECLARE_TYPE(QIODNSResolver, QIODNSResolverClass,
+ qio_dns_resolver, QIO_DNS_RESOLVER)
/**
diff --git a/include/io/net-listener.h b/include/io/net-listener.h
index 93367db291..4f0847ff19 100644
--- a/include/io/net-listener.h
+++ b/include/io/net-listener.h
@@ -25,10 +25,8 @@
#include "qom/object.h"
#define TYPE_QIO_NET_LISTENER "qio-net-listener"
-typedef struct QIONetListener QIONetListener;
-typedef struct QIONetListenerClass QIONetListenerClass;
-DECLARE_OBJ_CHECKERS(QIONetListener, QIONetListenerClass,
- QIO_NET_LISTENER, TYPE_QIO_NET_LISTENER)
+OBJECT_DECLARE_TYPE(QIONetListener, QIONetListenerClass,
+ qio_net_listener, QIO_NET_LISTENER)
typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,
diff --git a/include/scsi/pr-manager.h b/include/scsi/pr-manager.h
index f801fe9533..26bd134531 100644
--- a/include/scsi/pr-manager.h
+++ b/include/scsi/pr-manager.h
@@ -9,10 +9,8 @@
#define TYPE_PR_MANAGER "pr-manager"
-typedef struct PRManager PRManager;
-typedef struct PRManagerClass PRManagerClass;
-DECLARE_OBJ_CHECKERS(PRManager, PRManagerClass,
- PR_MANAGER, TYPE_PR_MANAGER)
+OBJECT_DECLARE_TYPE(PRManager, PRManagerClass,
+ pr_manager, PR_MANAGER)
struct sg_io_hdr;
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index 65c017cf81..06726f7014 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -37,10 +37,8 @@
#define TYPE_CRYPTODEV_BACKEND "cryptodev-backend"
-typedef struct CryptoDevBackend CryptoDevBackend;
-typedef struct CryptoDevBackendClass CryptoDevBackendClass;
-DECLARE_OBJ_CHECKERS(CryptoDevBackend, CryptoDevBackendClass,
- CRYPTODEV_BACKEND, TYPE_CRYPTODEV_BACKEND)
+OBJECT_DECLARE_TYPE(CryptoDevBackend, CryptoDevBackendClass,
+ cryptodev_backend, CRYPTODEV_BACKEND)
#define MAX_CRYPTO_QUEUE_NUM 64
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index 1e6078f872..e5b7a152d3 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -20,10 +20,8 @@
#include "qemu/bitmap.h"
#define TYPE_MEMORY_BACKEND "memory-backend"
-typedef struct HostMemoryBackend HostMemoryBackend;
-typedef struct HostMemoryBackendClass HostMemoryBackendClass;
-DECLARE_OBJ_CHECKERS(HostMemoryBackend, HostMemoryBackendClass,
- MEMORY_BACKEND, TYPE_MEMORY_BACKEND)
+OBJECT_DECLARE_TYPE(HostMemoryBackend, HostMemoryBackendClass,
+ memory_backend, MEMORY_BACKEND)
/* hostmem-ram.c */
/**
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index f8fc948109..cee45a4787 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -17,10 +17,8 @@
#include "qom/object.h"
#define TYPE_RNG_BACKEND "rng-backend"
-typedef struct RngBackend RngBackend;
-typedef struct RngBackendClass RngBackendClass;
-DECLARE_OBJ_CHECKERS(RngBackend, RngBackendClass,
- RNG_BACKEND, TYPE_RNG_BACKEND)
+OBJECT_DECLARE_TYPE(RngBackend, RngBackendClass,
+ rng_backend, RNG_BACKEND)
#define TYPE_RNG_BUILTIN "rng-builtin"
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index e038b79d34..7e8a014031 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -19,10 +19,8 @@
#include "qapi/error.h"
#define TYPE_TPM_BACKEND "tpm-backend"
-typedef struct TPMBackend TPMBackend;
-typedef struct TPMBackendClass TPMBackendClass;
-DECLARE_OBJ_CHECKERS(TPMBackend, TPMBackendClass,
- TPM_BACKEND, TYPE_TPM_BACKEND)
+OBJECT_DECLARE_TYPE(TPMBackend, TPMBackendClass,
+ tpm_backend, TPM_BACKEND)
typedef struct TPMBackendCmd {
diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-user-backend.h
index e4c85e33c0..76ca06cf40 100644
--- a/include/sysemu/vhost-user-backend.h
+++ b/include/sysemu/vhost-user-backend.h
@@ -22,10 +22,8 @@
#include "io/channel.h"
#define TYPE_VHOST_USER_BACKEND "vhost-user-backend"
-typedef struct VhostUserBackend VhostUserBackend;
-typedef struct VhostUserBackendClass VhostUserBackendClass;
-DECLARE_OBJ_CHECKERS(VhostUserBackend, VhostUserBackendClass,
- VHOST_USER_BACKEND, TYPE_VHOST_USER_BACKEND)
+OBJECT_DECLARE_TYPE(VhostUserBackend, VhostUserBackendClass,
+ vhost_user_backend, VHOST_USER_BACKEND)
struct VhostUserBackendClass {