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/ppc | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) |
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/ppc')
-rw-r--r-- | hw/ppc/e500-ccsr.h | 4 | ||||
-rw-r--r-- | hw/ppc/mac.h | 4 | ||||
-rw-r--r-- | hw/ppc/mpc8544_guts.c | 4 | ||||
-rw-r--r-- | hw/ppc/ppc440_pcix.c | 4 | ||||
-rw-r--r-- | hw/ppc/ppc440_uc.c | 4 | ||||
-rw-r--r-- | hw/ppc/ppc4xx_pci.c | 4 | ||||
-rw-r--r-- | hw/ppc/ppce500_spin.c | 4 | ||||
-rw-r--r-- | hw/ppc/prep_systemio.c | 4 | ||||
-rw-r--r-- | hw/ppc/rs6000_mc.c | 4 | ||||
-rw-r--r-- | hw/ppc/spapr_rng.c | 4 |
10 files changed, 10 insertions, 30 deletions
diff --git a/hw/ppc/e500-ccsr.h b/hw/ppc/e500-ccsr.h index de4b9d2bc3..249c17be3b 100644 --- a/hw/ppc/e500-ccsr.h +++ b/hw/ppc/e500-ccsr.h @@ -11,10 +11,8 @@ struct PPCE500CCSRState { MemoryRegion ccsr_space; }; -typedef struct PPCE500CCSRState PPCE500CCSRState; #define TYPE_CCSR "e500-ccsr" -DECLARE_INSTANCE_CHECKER(PPCE500CCSRState, CCSR, - TYPE_CCSR) +OBJECT_DECLARE_SIMPLE_TYPE(PPCE500CCSRState, CCSR) #endif /* E500_CCSR_H */ diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h index 2b6425f600..f3976b9a45 100644 --- a/hw/ppc/mac.h +++ b/hw/ppc/mac.h @@ -92,9 +92,7 @@ struct Core99MachineState { /* Mac NVRAM */ #define TYPE_MACIO_NVRAM "macio-nvram" -typedef struct MacIONVRAMState MacIONVRAMState; -DECLARE_INSTANCE_CHECKER(MacIONVRAMState, MACIO_NVRAM, - TYPE_MACIO_NVRAM) +OBJECT_DECLARE_SIMPLE_TYPE(MacIONVRAMState, MACIO_NVRAM) struct MacIONVRAMState { /*< private >*/ diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index b76b5e4701..e8d2d51c20 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -55,9 +55,7 @@ #define MPC8544_GUTS_ADDR_SRDS2CR3 0xF18 #define TYPE_MPC8544_GUTS "mpc8544-guts" -typedef struct GutsState GutsState; -DECLARE_INSTANCE_CHECKER(GutsState, MPC8544_GUTS, - TYPE_MPC8544_GUTS) +OBJECT_DECLARE_SIMPLE_TYPE(GutsState, MPC8544_GUTS) struct GutsState { /*< private >*/ diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index a564fcd600..ee952314c8 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -46,9 +46,7 @@ struct PLBInMap { }; #define TYPE_PPC440_PCIX_HOST_BRIDGE "ppc440-pcix-host" -typedef struct PPC440PCIXState PPC440PCIXState; -DECLARE_INSTANCE_CHECKER(PPC440PCIXState, PPC440_PCIX_HOST_BRIDGE, - TYPE_PPC440_PCIX_HOST_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(PPC440PCIXState, PPC440_PCIX_HOST_BRIDGE) #define PPC440_PCIX_NR_POMS 3 #define PPC440_PCIX_NR_PIMS 3 diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index d9ca6bba9b..f6f89058ab 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -1033,9 +1033,7 @@ void ppc4xx_dma_init(CPUPPCState *env, int dcr_base) #include "hw/pci/pcie_host.h" #define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host" -typedef struct PPC460EXPCIEState PPC460EXPCIEState; -DECLARE_INSTANCE_CHECKER(PPC460EXPCIEState, PPC460EX_PCIE_HOST, - TYPE_PPC460EX_PCIE_HOST) +OBJECT_DECLARE_SIMPLE_TYPE(PPC460EXPCIEState, PPC460EX_PCIE_HOST) struct PPC460EXPCIEState { PCIExpressHost host; diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c index c24bac96c3..c812d3408f 100644 --- a/hw/ppc/ppc4xx_pci.c +++ b/hw/ppc/ppc4xx_pci.c @@ -44,9 +44,7 @@ struct PCITargetMap { uint32_t la; }; -typedef struct PPC4xxPCIState PPC4xxPCIState; -DECLARE_INSTANCE_CHECKER(PPC4xxPCIState, PPC4xx_PCI_HOST_BRIDGE, - TYPE_PPC4xx_PCI_HOST_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(PPC4xxPCIState, PPC4xx_PCI_HOST_BRIDGE) #define PPC4xx_PCI_NR_PMMS 3 #define PPC4xx_PCI_NR_PTMS 2 diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c index cd8000ad73..25c9ce745f 100644 --- a/hw/ppc/ppce500_spin.c +++ b/hw/ppc/ppce500_spin.c @@ -47,9 +47,7 @@ typedef struct spin_info { } QEMU_PACKED SpinInfo; #define TYPE_E500_SPIN "e500-spin" -typedef struct SpinState SpinState; -DECLARE_INSTANCE_CHECKER(SpinState, E500_SPIN, - TYPE_E500_SPIN) +OBJECT_DECLARE_SIMPLE_TYPE(SpinState, E500_SPIN) struct SpinState { SysBusDevice parent_obj; diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c index d1e2fb3f8b..4e48ef245c 100644 --- a/hw/ppc/prep_systemio.c +++ b/hw/ppc/prep_systemio.c @@ -36,9 +36,7 @@ #include "trace.h" #define TYPE_PREP_SYSTEMIO "prep-systemio" -typedef struct PrepSystemIoState PrepSystemIoState; -DECLARE_INSTANCE_CHECKER(PrepSystemIoState, PREP_SYSTEMIO, - TYPE_PREP_SYSTEMIO) +OBJECT_DECLARE_SIMPLE_TYPE(PrepSystemIoState, PREP_SYSTEMIO) /* Bit as defined in PowerPC Reference Plaform v1.1, sect. 6.1.5, p. 132 */ #define PREP_BIT(n) (1 << (7 - (n))) diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c index 8611ffa96d..4db5b51a2d 100644 --- a/hw/ppc/rs6000_mc.c +++ b/hw/ppc/rs6000_mc.c @@ -29,9 +29,7 @@ #include "qom/object.h" #define TYPE_RS6000MC "rs6000-mc" -typedef struct RS6000MCState RS6000MCState; -DECLARE_INSTANCE_CHECKER(RS6000MCState, RS6000MC, - TYPE_RS6000MC) +OBJECT_DECLARE_SIMPLE_TYPE(RS6000MCState, RS6000MC) struct RS6000MCState { ISADevice parent_obj; diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 6c99633faa..d14800e9de 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -30,9 +30,7 @@ #include "kvm_ppc.h" #include "qom/object.h" -typedef struct SpaprRngState SpaprRngState; -DECLARE_INSTANCE_CHECKER(SpaprRngState, SPAPR_RNG, - TYPE_SPAPR_RNG) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprRngState, SPAPR_RNG) struct SpaprRngState { /*< private >*/ |