diff options
author | Eduardo Habkost | 2020-09-16 20:25:19 +0200 |
---|---|---|
committer | Eduardo Habkost | 2020-09-18 20:12:32 +0200 |
commit | 8063396bf3459a810d24e3efd6110b8480f0de5b (patch) | |
tree | 40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/intc | |
parent | Use OBJECT_DECLARE_TYPE when possible (diff) | |
download | qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.xz qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip |
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 'include/hw/intc')
-rw-r--r-- | include/hw/intc/allwinner-a10-pic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/aspeed_vic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/bcm2835_ic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/bcm2836_control.h | 4 | ||||
-rw-r--r-- | include/hw/intc/heathrow_pic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/ibex_plic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/imx_avic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/imx_gpcv2.h | 4 | ||||
-rw-r--r-- | include/hw/intc/mips_gic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/realview_gic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/rx_icu.h | 4 | ||||
-rw-r--r-- | include/hw/intc/xlnx-pmu-iomod-intc.h | 4 | ||||
-rw-r--r-- | include/hw/intc/xlnx-zynqmp-ipi.h | 4 |
13 files changed, 13 insertions, 39 deletions
diff --git a/include/hw/intc/allwinner-a10-pic.h b/include/hw/intc/allwinner-a10-pic.h index 4d7199480a..b8364d3ed4 100644 --- a/include/hw/intc/allwinner-a10-pic.h +++ b/include/hw/intc/allwinner-a10-pic.h @@ -5,9 +5,7 @@ #include "qom/object.h" #define TYPE_AW_A10_PIC "allwinner-a10-pic" -typedef struct AwA10PICState AwA10PICState; -DECLARE_INSTANCE_CHECKER(AwA10PICState, AW_A10_PIC, - TYPE_AW_A10_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(AwA10PICState, AW_A10_PIC) #define AW_A10_PIC_VECTOR 0 #define AW_A10_PIC_BASE_ADDR 4 diff --git a/include/hw/intc/aspeed_vic.h b/include/hw/intc/aspeed_vic.h index 8f2e67db5a..68d6ab997a 100644 --- a/include/hw/intc/aspeed_vic.h +++ b/include/hw/intc/aspeed_vic.h @@ -17,9 +17,7 @@ #include "qom/object.h" #define TYPE_ASPEED_VIC "aspeed.vic" -typedef struct AspeedVICState AspeedVICState; -DECLARE_INSTANCE_CHECKER(AspeedVICState, ASPEED_VIC, - TYPE_ASPEED_VIC) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedVICState, ASPEED_VIC) #define ASPEED_VIC_NR_IRQS 51 diff --git a/include/hw/intc/bcm2835_ic.h b/include/hw/intc/bcm2835_ic.h index fd4a767845..588eb76c5c 100644 --- a/include/hw/intc/bcm2835_ic.h +++ b/include/hw/intc/bcm2835_ic.h @@ -12,9 +12,7 @@ #include "qom/object.h" #define TYPE_BCM2835_IC "bcm2835-ic" -typedef struct BCM2835ICState BCM2835ICState; -DECLARE_INSTANCE_CHECKER(BCM2835ICState, BCM2835_IC, - TYPE_BCM2835_IC) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835ICState, BCM2835_IC) #define BCM2835_IC_GPU_IRQ "gpu-irq" #define BCM2835_IC_ARM_IRQ "arm-irq" diff --git a/include/hw/intc/bcm2836_control.h b/include/hw/intc/bcm2836_control.h index f23292776e..a410c817e8 100644 --- a/include/hw/intc/bcm2836_control.h +++ b/include/hw/intc/bcm2836_control.h @@ -24,9 +24,7 @@ #define BCM2836_MBPERCORE 4 #define TYPE_BCM2836_CONTROL "bcm2836-control" -typedef struct BCM2836ControlState BCM2836ControlState; -DECLARE_INSTANCE_CHECKER(BCM2836ControlState, BCM2836_CONTROL, - TYPE_BCM2836_CONTROL) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2836ControlState, BCM2836_CONTROL) struct BCM2836ControlState { /*< private >*/ diff --git a/include/hw/intc/heathrow_pic.h b/include/hw/intc/heathrow_pic.h index f8c9bc20ab..c0a7f6f546 100644 --- a/include/hw/intc/heathrow_pic.h +++ b/include/hw/intc/heathrow_pic.h @@ -30,9 +30,7 @@ #include "qom/object.h" #define TYPE_HEATHROW "heathrow" -typedef struct HeathrowState HeathrowState; -DECLARE_INSTANCE_CHECKER(HeathrowState, HEATHROW, - TYPE_HEATHROW) +OBJECT_DECLARE_SIMPLE_TYPE(HeathrowState, HEATHROW) typedef struct HeathrowPICState { uint32_t events; diff --git a/include/hw/intc/ibex_plic.h b/include/hw/intc/ibex_plic.h index 8da6b03805..37f03356b3 100644 --- a/include/hw/intc/ibex_plic.h +++ b/include/hw/intc/ibex_plic.h @@ -23,9 +23,7 @@ #include "qom/object.h" #define TYPE_IBEX_PLIC "ibex-plic" -typedef struct IbexPlicState IbexPlicState; -DECLARE_INSTANCE_CHECKER(IbexPlicState, IBEX_PLIC, - TYPE_IBEX_PLIC) +OBJECT_DECLARE_SIMPLE_TYPE(IbexPlicState, IBEX_PLIC) struct IbexPlicState { /*< private >*/ diff --git a/include/hw/intc/imx_avic.h b/include/hw/intc/imx_avic.h index 621742533c..75fbd1a89c 100644 --- a/include/hw/intc/imx_avic.h +++ b/include/hw/intc/imx_avic.h @@ -21,9 +21,7 @@ #include "qom/object.h" #define TYPE_IMX_AVIC "imx.avic" -typedef struct IMXAVICState IMXAVICState; -DECLARE_INSTANCE_CHECKER(IMXAVICState, IMX_AVIC, - TYPE_IMX_AVIC) +OBJECT_DECLARE_SIMPLE_TYPE(IMXAVICState, IMX_AVIC) #define IMX_AVIC_NUM_IRQS 64 diff --git a/include/hw/intc/imx_gpcv2.h b/include/hw/intc/imx_gpcv2.h index 2d8075e527..7bdee7e80a 100644 --- a/include/hw/intc/imx_gpcv2.h +++ b/include/hw/intc/imx_gpcv2.h @@ -16,10 +16,8 @@ struct IMXGPCv2State { MemoryRegion iomem; uint32_t regs[GPC_NUM]; }; -typedef struct IMXGPCv2State IMXGPCv2State; #define TYPE_IMX_GPCV2 "imx-gpcv2" -DECLARE_INSTANCE_CHECKER(IMXGPCv2State, IMX_GPCV2, - TYPE_IMX_GPCV2) +OBJECT_DECLARE_SIMPLE_TYPE(IMXGPCv2State, IMX_GPCV2) #endif /* IMX_GPCV2_H */ diff --git a/include/hw/intc/mips_gic.h b/include/hw/intc/mips_gic.h index 65aa3a9a5e..eeb136e261 100644 --- a/include/hw/intc/mips_gic.h +++ b/include/hw/intc/mips_gic.h @@ -171,9 +171,7 @@ #define GIC_LOCAL_INT_WD 0 /* GIC watchdog */ #define TYPE_MIPS_GIC "mips-gic" -typedef struct MIPSGICState MIPSGICState; -DECLARE_INSTANCE_CHECKER(MIPSGICState, MIPS_GIC, - TYPE_MIPS_GIC) +OBJECT_DECLARE_SIMPLE_TYPE(MIPSGICState, MIPS_GIC) /* Support up to 32 VPs and 256 IRQs */ #define GIC_MAX_VPS 32 diff --git a/include/hw/intc/realview_gic.h b/include/hw/intc/realview_gic.h index a93ace87c8..f37339dc0b 100644 --- a/include/hw/intc/realview_gic.h +++ b/include/hw/intc/realview_gic.h @@ -15,9 +15,7 @@ #include "qom/object.h" #define TYPE_REALVIEW_GIC "realview_gic" -typedef struct RealViewGICState RealViewGICState; -DECLARE_INSTANCE_CHECKER(RealViewGICState, REALVIEW_GIC, - TYPE_REALVIEW_GIC) +OBJECT_DECLARE_SIMPLE_TYPE(RealViewGICState, REALVIEW_GIC) struct RealViewGICState { SysBusDevice parent_obj; diff --git a/include/hw/intc/rx_icu.h b/include/hw/intc/rx_icu.h index ec02df35e3..7f5889b36f 100644 --- a/include/hw/intc/rx_icu.h +++ b/include/hw/intc/rx_icu.h @@ -69,10 +69,8 @@ struct RXICUState { qemu_irq _fir; qemu_irq _swi; }; -typedef struct RXICUState RXICUState; #define TYPE_RX_ICU "rx-icu" -DECLARE_INSTANCE_CHECKER(RXICUState, RX_ICU, - TYPE_RX_ICU) +OBJECT_DECLARE_SIMPLE_TYPE(RXICUState, RX_ICU) #endif /* RX_ICU_H */ diff --git a/include/hw/intc/xlnx-pmu-iomod-intc.h b/include/hw/intc/xlnx-pmu-iomod-intc.h index 7a560e97af..ccc8bd272a 100644 --- a/include/hw/intc/xlnx-pmu-iomod-intc.h +++ b/include/hw/intc/xlnx-pmu-iomod-intc.h @@ -31,9 +31,7 @@ #define TYPE_XLNX_PMU_IO_INTC "xlnx.pmu_io_intc" -typedef struct XlnxPMUIOIntc XlnxPMUIOIntc; -DECLARE_INSTANCE_CHECKER(XlnxPMUIOIntc, XLNX_PMU_IO_INTC, - TYPE_XLNX_PMU_IO_INTC) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxPMUIOIntc, XLNX_PMU_IO_INTC) /* This is R_PIT3_CONTROL + 1 */ #define XLNXPMUIOINTC_R_MAX (0x78 + 1) diff --git a/include/hw/intc/xlnx-zynqmp-ipi.h b/include/hw/intc/xlnx-zynqmp-ipi.h index 29c48db307..33eff1d4f6 100644 --- a/include/hw/intc/xlnx-zynqmp-ipi.h +++ b/include/hw/intc/xlnx-zynqmp-ipi.h @@ -31,9 +31,7 @@ #define TYPE_XLNX_ZYNQMP_IPI "xlnx.zynqmp_ipi" -typedef struct XlnxZynqMPIPI XlnxZynqMPIPI; -DECLARE_INSTANCE_CHECKER(XlnxZynqMPIPI, XLNX_ZYNQMP_IPI, - TYPE_XLNX_ZYNQMP_IPI) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPIPI, XLNX_ZYNQMP_IPI) /* This is R_IPI_IDR + 1 */ #define R_XLNX_ZYNQMP_IPI_MAX ((0x1c / 4) + 1) |