mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
One of the goals of having less boilerplate on QOM declarations
is to avoid human error. Requiring an extra argument that is
never used is an opportunity for mistakes.
Remove the unused argument from OBJECT_DECLARE_TYPE and
OBJECT_DECLARE_SIMPLE_TYPE.
Coccinelle patch used to convert all users of the macros:
@@
declarer name OBJECT_DECLARE_TYPE;
identifier InstanceType, ClassType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_TYPE(InstanceType, ClassType,
- lowercase,
UPPERCASE);
@@
declarer name OBJECT_DECLARE_SIMPLE_TYPE;
identifier InstanceType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_SIMPLE_TYPE(InstanceType,
- lowercase,
UPPERCASE);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200916182519.415636-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#define TYPE_DBUS_VMSTATE "dbus-vmstate"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(DBusVMState, dbus_vmstate,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(DBusVMState,
|
||||
DBUS_VMSTATE)
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#define TYPE_HDA_CODEC_DEVICE "hda-codec"
|
||||
OBJECT_DECLARE_TYPE(HDACodecDevice, HDACodecDeviceClass,
|
||||
hda_codec_device, HDA_CODEC_DEVICE)
|
||||
HDA_CODEC_DEVICE)
|
||||
|
||||
#define TYPE_HDA_BUS "HDA"
|
||||
typedef struct HDACodecBus HDACodecBus;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
#define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"
|
||||
OBJECT_DECLARE_TYPE(VirtIOVGABase, VirtIOVGABaseClass,
|
||||
virtio_vga_base, VIRTIO_VGA_BASE)
|
||||
VIRTIO_VGA_BASE)
|
||||
|
||||
struct VirtIOVGABase {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#define TYPE_QAUTHZ "authz"
|
||||
|
||||
OBJECT_DECLARE_TYPE(QAuthZ, QAuthZClass,
|
||||
qauthz, QAUTHZ)
|
||||
QAUTHZ)
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define TYPE_QAUTHZ_LIST "authz-list"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZList, qauthz_list,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZList,
|
||||
QAUTHZ_LIST)
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define TYPE_QAUTHZ_LIST_FILE "authz-list-file"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZListFile, qauthz_list_file,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZListFile,
|
||||
QAUTHZ_LIST_FILE)
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define TYPE_QAUTHZ_PAM "authz-pam"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZPAM, qauthz_pam,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZPAM,
|
||||
QAUTHZ_PAM)
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#define TYPE_QAUTHZ_SIMPLE "authz-simple"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZSimple, qauthz_simple,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QAuthZSimple,
|
||||
QAUTHZ_SIMPLE)
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#define TYPE_QCRYPTO_SECRET_COMMON "secret_common"
|
||||
OBJECT_DECLARE_TYPE(QCryptoSecretCommon, QCryptoSecretCommonClass,
|
||||
qcrypto_secret_common, QCRYPTO_SECRET_COMMON)
|
||||
QCRYPTO_SECRET_COMMON)
|
||||
|
||||
|
||||
struct QCryptoSecretCommon {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "crypto/secret_common.h"
|
||||
|
||||
#define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QCryptoSecretKeyring, qcrypto_secret_keyring,
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QCryptoSecretKeyring,
|
||||
QCRYPTO_SECRET_KEYRING)
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
#define TYPE_ARM_SSE "arm-sse"
|
||||
OBJECT_DECLARE_TYPE(ARMSSE, ARMSSEClass,
|
||||
arm_sse, ARM_SSE)
|
||||
ARM_SSE)
|
||||
|
||||
/*
|
||||
* These type names are for specific IoTKit subsystems; other than
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define TYPE_VMBUS_DEVICE "vmbus-dev"
|
||||
|
||||
OBJECT_DECLARE_TYPE(VMBusDevice, VMBusDeviceClass,
|
||||
vmbus_device, VMBUS_DEVICE)
|
||||
VMBUS_DEVICE)
|
||||
|
||||
#define TYPE_VMBUS "vmbus"
|
||||
typedef struct VMBus VMBus;
|
||||
|
||||
@@ -19,7 +19,7 @@ enum i2c_event {
|
||||
|
||||
#define TYPE_I2C_SLAVE "i2c-slave"
|
||||
OBJECT_DECLARE_TYPE(I2CSlave, I2CSlaveClass,
|
||||
i2c_slave, I2C_SLAVE)
|
||||
I2C_SLAVE)
|
||||
|
||||
struct I2CSlaveClass {
|
||||
DeviceClass parent_class;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define TYPE_SMBUS_DEVICE "smbus-device"
|
||||
OBJECT_DECLARE_TYPE(SMBusDevice, SMBusDeviceClass,
|
||||
smbus_device, SMBUS_DEVICE)
|
||||
SMBUS_DEVICE)
|
||||
|
||||
|
||||
struct SMBusDeviceClass {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct IPackBus {
|
||||
|
||||
#define TYPE_IPACK_DEVICE "ipack-device"
|
||||
OBJECT_DECLARE_TYPE(IPackDevice, IPackDeviceClass,
|
||||
ipack_device, IPACK_DEVICE)
|
||||
IPACK_DEVICE)
|
||||
|
||||
struct IPackDeviceClass {
|
||||
/*< private >*/
|
||||
|
||||
@@ -177,7 +177,7 @@ struct IPMIInterfaceClass {
|
||||
*/
|
||||
#define TYPE_IPMI_BMC "ipmi-bmc"
|
||||
OBJECT_DECLARE_TYPE(IPMIBmc, IPMIBmcClass,
|
||||
ipmi_bmc, IPMI_BMC)
|
||||
IPMI_BMC)
|
||||
|
||||
struct IPMIBmc {
|
||||
DeviceState parent;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#define TYPE_PC_DIMM "pc-dimm"
|
||||
OBJECT_DECLARE_TYPE(PCDIMMDevice, PCDIMMDeviceClass,
|
||||
pc_dimm, PC_DIMM)
|
||||
PC_DIMM)
|
||||
|
||||
#define PC_DIMM_ADDR_PROP "addr"
|
||||
#define PC_DIMM_SLOT_PROP "slot"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#define TYPE_PNV_CHIP "pnv-chip"
|
||||
OBJECT_DECLARE_TYPE(PnvChip, PnvChipClass,
|
||||
pnv_chip, PNV_CHIP)
|
||||
PNV_CHIP)
|
||||
|
||||
struct PnvChip {
|
||||
/*< private >*/
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#define TYPE_PNV_CORE "powernv-cpu-core"
|
||||
OBJECT_DECLARE_TYPE(PnvCore, PnvCoreClass,
|
||||
pnv_core, PNV_CORE)
|
||||
PNV_CORE)
|
||||
|
||||
typedef struct PnvChip PnvChip;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#define TYPE_PNV_HOMER "pnv-homer"
|
||||
OBJECT_DECLARE_TYPE(PnvHomer, PnvHomerClass,
|
||||
pnv_homer, 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