mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Use OBJECT_DECLARE_TYPE where possible
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200831210740.126168-16-ehabkost@redhat.com> Message-Id: <20200831210740.126168-17-ehabkost@redhat.com> Message-Id: <20200831210740.126168-18-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
@@ -21,12 +21,10 @@
|
||||
#include "trace.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct DBusVMState DBusVMState;
|
||||
typedef struct DBusVMStateClass DBusVMStateClass;
|
||||
|
||||
#define TYPE_DBUS_VMSTATE "dbus-vmstate"
|
||||
DECLARE_OBJ_CHECKERS(DBusVMState, DBusVMStateClass,
|
||||
DBUS_VMSTATE, TYPE_DBUS_VMSTATE)
|
||||
OBJECT_DECLARE_TYPE(DBusVMState, DBusVMStateClass,
|
||||
dbus_vmstate, DBUS_VMSTATE)
|
||||
|
||||
struct DBusVMStateClass {
|
||||
ObjectClass parent_class;
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
/* hda bus */
|
||||
|
||||
#define TYPE_HDA_CODEC_DEVICE "hda-codec"
|
||||
typedef struct HDACodecDevice HDACodecDevice;
|
||||
typedef struct HDACodecDeviceClass HDACodecDeviceClass;
|
||||
DECLARE_OBJ_CHECKERS(HDACodecDevice, HDACodecDeviceClass,
|
||||
HDA_CODEC_DEVICE, TYPE_HDA_CODEC_DEVICE)
|
||||
OBJECT_DECLARE_TYPE(HDACodecDevice, HDACodecDeviceClass,
|
||||
hda_codec_device, HDA_CODEC_DEVICE)
|
||||
|
||||
#define TYPE_HDA_BUS "HDA"
|
||||
typedef struct HDACodecBus HDACodecBus;
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
* virtio-vga-base: This extends VirtioPCIProxy.
|
||||
*/
|
||||
#define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"
|
||||
typedef struct VirtIOVGABase VirtIOVGABase;
|
||||
typedef struct VirtIOVGABaseClass VirtIOVGABaseClass;
|
||||
DECLARE_OBJ_CHECKERS(VirtIOVGABase, VirtIOVGABaseClass,
|
||||
VIRTIO_VGA_BASE, TYPE_VIRTIO_VGA_BASE)
|
||||
OBJECT_DECLARE_TYPE(VirtIOVGABase, VirtIOVGABaseClass,
|
||||
virtio_vga_base, VIRTIO_VGA_BASE)
|
||||
|
||||
struct VirtIOVGABase {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 >*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 >*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user