diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:19 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 8063396bf3459a810d24e3efd6110b8480f0de5b (patch) | |
tree | 40f85f15d7016e3ee66916a59be53d2b2c71510a /hw/ipmi | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) | |
download | qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.bz2 |
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 <ehabkost@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/ipmi')
-rw-r--r-- | hw/ipmi/ipmi_bmc_extern.c | 4 | ||||
-rw-r--r-- | hw/ipmi/isa_ipmi_bt.c | 4 | ||||
-rw-r--r-- | hw/ipmi/isa_ipmi_kcs.c | 4 | ||||
-rw-r--r-- | hw/ipmi/pci_ipmi_bt.c | 4 | ||||
-rw-r--r-- | hw/ipmi/pci_ipmi_kcs.c | 4 | ||||
-rw-r--r-- | hw/ipmi/smbus_ipmi.c | 4 |
6 files changed, 6 insertions, 18 deletions
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 159831c..c3f3306 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -62,9 +62,7 @@ #define VM_CMD_GRACEFUL_SHUTDOWN 0x09 #define TYPE_IPMI_BMC_EXTERN "ipmi-bmc-extern" -typedef struct IPMIBmcExtern IPMIBmcExtern; -DECLARE_INSTANCE_CHECKER(IPMIBmcExtern, IPMI_BMC_EXTERN, - TYPE_IPMI_BMC_EXTERN) +OBJECT_DECLARE_SIMPLE_TYPE(IPMIBmcExtern, IPMI_BMC_EXTERN) struct IPMIBmcExtern { IPMIBmc parent; diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c index 0b69acc..b7c2ad5 100644 --- a/hw/ipmi/isa_ipmi_bt.c +++ b/hw/ipmi/isa_ipmi_bt.c @@ -34,9 +34,7 @@ #include "qom/object.h" #define TYPE_ISA_IPMI_BT "isa-ipmi-bt" -typedef struct ISAIPMIBTDevice ISAIPMIBTDevice; -DECLARE_INSTANCE_CHECKER(ISAIPMIBTDevice, ISA_IPMI_BT, - TYPE_ISA_IPMI_BT) +OBJECT_DECLARE_SIMPLE_TYPE(ISAIPMIBTDevice, ISA_IPMI_BT) struct ISAIPMIBTDevice { ISADevice dev; diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c index af69e9a..7dd6bf0 100644 --- a/hw/ipmi/isa_ipmi_kcs.c +++ b/hw/ipmi/isa_ipmi_kcs.c @@ -34,9 +34,7 @@ #include "qom/object.h" #define TYPE_ISA_IPMI_KCS "isa-ipmi-kcs" -typedef struct ISAIPMIKCSDevice ISAIPMIKCSDevice; -DECLARE_INSTANCE_CHECKER(ISAIPMIKCSDevice, ISA_IPMI_KCS, - TYPE_ISA_IPMI_KCS) +OBJECT_DECLARE_SIMPLE_TYPE(ISAIPMIKCSDevice, ISA_IPMI_KCS) struct ISAIPMIKCSDevice { ISADevice dev; diff --git a/hw/ipmi/pci_ipmi_bt.c b/hw/ipmi/pci_ipmi_bt.c index 7e5ecea..b6e5273 100644 --- a/hw/ipmi/pci_ipmi_bt.c +++ b/hw/ipmi/pci_ipmi_bt.c @@ -29,9 +29,7 @@ #include "qom/object.h" #define TYPE_PCI_IPMI_BT "pci-ipmi-bt" -typedef struct PCIIPMIBTDevice PCIIPMIBTDevice; -DECLARE_INSTANCE_CHECKER(PCIIPMIBTDevice, PCI_IPMI_BT, - TYPE_PCI_IPMI_BT) +OBJECT_DECLARE_SIMPLE_TYPE(PCIIPMIBTDevice, PCI_IPMI_BT) struct PCIIPMIBTDevice { PCIDevice dev; diff --git a/hw/ipmi/pci_ipmi_kcs.c b/hw/ipmi/pci_ipmi_kcs.c index c2a283a..de13418 100644 --- a/hw/ipmi/pci_ipmi_kcs.c +++ b/hw/ipmi/pci_ipmi_kcs.c @@ -29,9 +29,7 @@ #include "qom/object.h" #define TYPE_PCI_IPMI_KCS "pci-ipmi-kcs" -typedef struct PCIIPMIKCSDevice PCIIPMIKCSDevice; -DECLARE_INSTANCE_CHECKER(PCIIPMIKCSDevice, PCI_IPMI_KCS, - TYPE_PCI_IPMI_KCS) +OBJECT_DECLARE_SIMPLE_TYPE(PCIIPMIKCSDevice, PCI_IPMI_KCS) struct PCIIPMIKCSDevice { PCIDevice dev; diff --git a/hw/ipmi/smbus_ipmi.c b/hw/ipmi/smbus_ipmi.c index cd4c05d..1fdf0a6 100644 --- a/hw/ipmi/smbus_ipmi.c +++ b/hw/ipmi/smbus_ipmi.c @@ -30,9 +30,7 @@ #include "qom/object.h" #define TYPE_SMBUS_IPMI "smbus-ipmi" -typedef struct SMBusIPMIDevice SMBusIPMIDevice; -DECLARE_INSTANCE_CHECKER(SMBusIPMIDevice, SMBUS_IPMI, - TYPE_SMBUS_IPMI) +OBJECT_DECLARE_SIMPLE_TYPE(SMBusIPMIDevice, SMBUS_IPMI) #define SSIF_IPMI_REQUEST 2 #define SSIF_IPMI_MULTI_PART_REQUEST_START 6 |