diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-31 17:07:33 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-09 09:27:09 -0400 |
commit | 8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch) | |
tree | 6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/intc | |
parent | db1015e92e04835c9eb50c29625fe566d1202dbd (diff) | |
download | qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.bz2 |
Use DECLARE_*CHECKER* macros
Generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-13-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-14-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 | 3 | ||||
-rw-r--r-- | include/hw/intc/arm_gic_common.h | 8 | ||||
-rw-r--r-- | include/hw/intc/arm_gicv3_common.h | 8 | ||||
-rw-r--r-- | include/hw/intc/arm_gicv3_its_common.h | 8 | ||||
-rw-r--r-- | include/hw/intc/armv7m_nvic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/aspeed_vic.h | 3 | ||||
-rw-r--r-- | include/hw/intc/bcm2835_ic.h | 3 | ||||
-rw-r--r-- | include/hw/intc/bcm2836_control.h | 4 | ||||
-rw-r--r-- | include/hw/intc/heathrow_pic.h | 3 | ||||
-rw-r--r-- | include/hw/intc/ibex_plic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/imx_avic.h | 3 | ||||
-rw-r--r-- | include/hw/intc/imx_gpcv2.h | 3 | ||||
-rw-r--r-- | include/hw/intc/intc.h | 6 | ||||
-rw-r--r-- | include/hw/intc/mips_gic.h | 3 | ||||
-rw-r--r-- | include/hw/intc/realview_gic.h | 4 | ||||
-rw-r--r-- | include/hw/intc/rx_icu.h | 3 | ||||
-rw-r--r-- | include/hw/intc/xlnx-pmu-iomod-intc.h | 4 | ||||
-rw-r--r-- | include/hw/intc/xlnx-zynqmp-ipi.h | 4 |
18 files changed, 35 insertions, 43 deletions
diff --git a/include/hw/intc/allwinner-a10-pic.h b/include/hw/intc/allwinner-a10-pic.h index 692d2a8..4d71994 100644 --- a/include/hw/intc/allwinner-a10-pic.h +++ b/include/hw/intc/allwinner-a10-pic.h @@ -6,7 +6,8 @@ #define TYPE_AW_A10_PIC "allwinner-a10-pic" typedef struct AwA10PICState AwA10PICState; -#define AW_A10_PIC(obj) OBJECT_CHECK(AwA10PICState, (obj), TYPE_AW_A10_PIC) +DECLARE_INSTANCE_CHECKER(AwA10PICState, AW_A10_PIC, + TYPE_AW_A10_PIC) #define AW_A10_PIC_VECTOR 0 #define AW_A10_PIC_BASE_ADDR 4 diff --git a/include/hw/intc/arm_gic_common.h b/include/hw/intc/arm_gic_common.h index 2cbde9b..7080375 100644 --- a/include/hw/intc/arm_gic_common.h +++ b/include/hw/intc/arm_gic_common.h @@ -149,12 +149,8 @@ typedef struct GICState GICState; #define TYPE_ARM_GIC_COMMON "arm_gic_common" typedef struct ARMGICCommonClass ARMGICCommonClass; -#define ARM_GIC_COMMON(obj) \ - OBJECT_CHECK(GICState, (obj), TYPE_ARM_GIC_COMMON) -#define ARM_GIC_COMMON_CLASS(klass) \ - OBJECT_CLASS_CHECK(ARMGICCommonClass, (klass), TYPE_ARM_GIC_COMMON) -#define ARM_GIC_COMMON_GET_CLASS(obj) \ - OBJECT_GET_CLASS(ARMGICCommonClass, (obj), TYPE_ARM_GIC_COMMON) +DECLARE_OBJ_CHECKERS(GICState, ARMGICCommonClass, + ARM_GIC_COMMON, TYPE_ARM_GIC_COMMON) struct ARMGICCommonClass { /*< private >*/ diff --git a/include/hw/intc/arm_gicv3_common.h b/include/hw/intc/arm_gicv3_common.h index 86fb060..0331b0f 100644 --- a/include/hw/intc/arm_gicv3_common.h +++ b/include/hw/intc/arm_gicv3_common.h @@ -281,12 +281,8 @@ GICV3_BITMAP_ACCESSORS(edge_trigger) #define TYPE_ARM_GICV3_COMMON "arm-gicv3-common" typedef struct ARMGICv3CommonClass ARMGICv3CommonClass; -#define ARM_GICV3_COMMON(obj) \ - OBJECT_CHECK(GICv3State, (obj), TYPE_ARM_GICV3_COMMON) -#define ARM_GICV3_COMMON_CLASS(klass) \ - OBJECT_CLASS_CHECK(ARMGICv3CommonClass, (klass), TYPE_ARM_GICV3_COMMON) -#define ARM_GICV3_COMMON_GET_CLASS(obj) \ - OBJECT_GET_CLASS(ARMGICv3CommonClass, (obj), TYPE_ARM_GICV3_COMMON) +DECLARE_OBJ_CHECKERS(GICv3State, ARMGICv3CommonClass, + ARM_GICV3_COMMON, TYPE_ARM_GICV3_COMMON) struct ARMGICv3CommonClass { /*< private >*/ diff --git a/include/hw/intc/arm_gicv3_its_common.h b/include/hw/intc/arm_gicv3_its_common.h index 03a0fa3..5a0952b 100644 --- a/include/hw/intc/arm_gicv3_its_common.h +++ b/include/hw/intc/arm_gicv3_its_common.h @@ -66,12 +66,8 @@ void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops); #define TYPE_ARM_GICV3_ITS_COMMON "arm-gicv3-its-common" typedef struct GICv3ITSCommonClass GICv3ITSCommonClass; -#define ARM_GICV3_ITS_COMMON(obj) \ - OBJECT_CHECK(GICv3ITSState, (obj), TYPE_ARM_GICV3_ITS_COMMON) -#define ARM_GICV3_ITS_COMMON_CLASS(klass) \ - OBJECT_CLASS_CHECK(GICv3ITSCommonClass, (klass), TYPE_ARM_GICV3_ITS_COMMON) -#define ARM_GICV3_ITS_COMMON_GET_CLASS(obj) \ - OBJECT_GET_CLASS(GICv3ITSCommonClass, (obj), TYPE_ARM_GICV3_ITS_COMMON) +DECLARE_OBJ_CHECKERS(GICv3ITSState, GICv3ITSCommonClass, + ARM_GICV3_ITS_COMMON, TYPE_ARM_GICV3_ITS_COMMON) struct GICv3ITSCommonClass { /*< private >*/ diff --git a/include/hw/intc/armv7m_nvic.h b/include/hw/intc/armv7m_nvic.h index 6309882..bb087b2 100644 --- a/include/hw/intc/armv7m_nvic.h +++ b/include/hw/intc/armv7m_nvic.h @@ -18,8 +18,8 @@ #define TYPE_NVIC "armv7m_nvic" typedef struct NVICState NVICState; -#define NVIC(obj) \ - OBJECT_CHECK(NVICState, (obj), TYPE_NVIC) +DECLARE_INSTANCE_CHECKER(NVICState, NVIC, + TYPE_NVIC) /* Highest permitted number of exceptions (architectural limit) */ #define NVIC_MAX_VECTORS 512 diff --git a/include/hw/intc/aspeed_vic.h b/include/hw/intc/aspeed_vic.h index f8844b3..8f2e67d 100644 --- a/include/hw/intc/aspeed_vic.h +++ b/include/hw/intc/aspeed_vic.h @@ -18,7 +18,8 @@ #define TYPE_ASPEED_VIC "aspeed.vic" typedef struct AspeedVICState AspeedVICState; -#define ASPEED_VIC(obj) OBJECT_CHECK(AspeedVICState, (obj), TYPE_ASPEED_VIC) +DECLARE_INSTANCE_CHECKER(AspeedVICState, ASPEED_VIC, + TYPE_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 4a9f093..fd4a767 100644 --- a/include/hw/intc/bcm2835_ic.h +++ b/include/hw/intc/bcm2835_ic.h @@ -13,7 +13,8 @@ #define TYPE_BCM2835_IC "bcm2835-ic" typedef struct BCM2835ICState BCM2835ICState; -#define BCM2835_IC(obj) OBJECT_CHECK(BCM2835ICState, (obj), TYPE_BCM2835_IC) +DECLARE_INSTANCE_CHECKER(BCM2835ICState, BCM2835_IC, + TYPE_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 7d8a51f..f232927 100644 --- a/include/hw/intc/bcm2836_control.h +++ b/include/hw/intc/bcm2836_control.h @@ -25,8 +25,8 @@ #define TYPE_BCM2836_CONTROL "bcm2836-control" typedef struct BCM2836ControlState BCM2836ControlState; -#define BCM2836_CONTROL(obj) \ - OBJECT_CHECK(BCM2836ControlState, (obj), TYPE_BCM2836_CONTROL) +DECLARE_INSTANCE_CHECKER(BCM2836ControlState, BCM2836_CONTROL, + TYPE_BCM2836_CONTROL) struct BCM2836ControlState { /*< private >*/ diff --git a/include/hw/intc/heathrow_pic.h b/include/hw/intc/heathrow_pic.h index bd9fc11..f8c9bc2 100644 --- a/include/hw/intc/heathrow_pic.h +++ b/include/hw/intc/heathrow_pic.h @@ -31,7 +31,8 @@ #define TYPE_HEATHROW "heathrow" typedef struct HeathrowState HeathrowState; -#define HEATHROW(obj) OBJECT_CHECK(HeathrowState, (obj), TYPE_HEATHROW) +DECLARE_INSTANCE_CHECKER(HeathrowState, HEATHROW, + TYPE_HEATHROW) typedef struct HeathrowPICState { uint32_t events; diff --git a/include/hw/intc/ibex_plic.h b/include/hw/intc/ibex_plic.h index 0125b36..8da6b03 100644 --- a/include/hw/intc/ibex_plic.h +++ b/include/hw/intc/ibex_plic.h @@ -24,8 +24,8 @@ #define TYPE_IBEX_PLIC "ibex-plic" typedef struct IbexPlicState IbexPlicState; -#define IBEX_PLIC(obj) \ - OBJECT_CHECK(IbexPlicState, (obj), TYPE_IBEX_PLIC) +DECLARE_INSTANCE_CHECKER(IbexPlicState, IBEX_PLIC, + TYPE_IBEX_PLIC) struct IbexPlicState { /*< private >*/ diff --git a/include/hw/intc/imx_avic.h b/include/hw/intc/imx_avic.h index 124f29f..6217425 100644 --- a/include/hw/intc/imx_avic.h +++ b/include/hw/intc/imx_avic.h @@ -22,7 +22,8 @@ #define TYPE_IMX_AVIC "imx.avic" typedef struct IMXAVICState IMXAVICState; -#define IMX_AVIC(obj) OBJECT_CHECK(IMXAVICState, (obj), TYPE_IMX_AVIC) +DECLARE_INSTANCE_CHECKER(IMXAVICState, IMX_AVIC, + TYPE_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 66befda..2d8075e 100644 --- a/include/hw/intc/imx_gpcv2.h +++ b/include/hw/intc/imx_gpcv2.h @@ -19,6 +19,7 @@ struct IMXGPCv2State { typedef struct IMXGPCv2State IMXGPCv2State; #define TYPE_IMX_GPCV2 "imx-gpcv2" -#define IMX_GPCV2(obj) OBJECT_CHECK(IMXGPCv2State, (obj), TYPE_IMX_GPCV2) +DECLARE_INSTANCE_CHECKER(IMXGPCv2State, IMX_GPCV2, + TYPE_IMX_GPCV2) #endif /* IMX_GPCV2_H */ diff --git a/include/hw/intc/intc.h b/include/hw/intc/intc.h index b51c0ac..7018f60 100644 --- a/include/hw/intc/intc.h +++ b/include/hw/intc/intc.h @@ -6,12 +6,8 @@ #define TYPE_INTERRUPT_STATS_PROVIDER "intctrl" typedef struct InterruptStatsProviderClass InterruptStatsProviderClass; -#define INTERRUPT_STATS_PROVIDER_CLASS(klass) \ - OBJECT_CLASS_CHECK(InterruptStatsProviderClass, (klass), \ +DECLARE_CLASS_CHECKERS(InterruptStatsProviderClass, INTERRUPT_STATS_PROVIDER, TYPE_INTERRUPT_STATS_PROVIDER) -#define INTERRUPT_STATS_PROVIDER_GET_CLASS(obj) \ - OBJECT_GET_CLASS(InterruptStatsProviderClass, (obj), \ - TYPE_INTERRUPT_STATS_PROVIDER) #define INTERRUPT_STATS_PROVIDER(obj) \ INTERFACE_CHECK(InterruptStatsProvider, (obj), \ TYPE_INTERRUPT_STATS_PROVIDER) diff --git a/include/hw/intc/mips_gic.h b/include/hw/intc/mips_gic.h index 5670421..65aa3a9 100644 --- a/include/hw/intc/mips_gic.h +++ b/include/hw/intc/mips_gic.h @@ -172,7 +172,8 @@ #define TYPE_MIPS_GIC "mips-gic" typedef struct MIPSGICState MIPSGICState; -#define MIPS_GIC(obj) OBJECT_CHECK(MIPSGICState, (obj), TYPE_MIPS_GIC) +DECLARE_INSTANCE_CHECKER(MIPSGICState, MIPS_GIC, + TYPE_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 e633992..a93ace8 100644 --- a/include/hw/intc/realview_gic.h +++ b/include/hw/intc/realview_gic.h @@ -16,8 +16,8 @@ #define TYPE_REALVIEW_GIC "realview_gic" typedef struct RealViewGICState RealViewGICState; -#define REALVIEW_GIC(obj) \ - OBJECT_CHECK(RealViewGICState, (obj), TYPE_REALVIEW_GIC) +DECLARE_INSTANCE_CHECKER(RealViewGICState, REALVIEW_GIC, + TYPE_REALVIEW_GIC) struct RealViewGICState { SysBusDevice parent_obj; diff --git a/include/hw/intc/rx_icu.h b/include/hw/intc/rx_icu.h index 5660cb4..ec02df3 100644 --- a/include/hw/intc/rx_icu.h +++ b/include/hw/intc/rx_icu.h @@ -72,6 +72,7 @@ struct RXICUState { typedef struct RXICUState RXICUState; #define TYPE_RX_ICU "rx-icu" -#define RX_ICU(obj) OBJECT_CHECK(RXICUState, (obj), TYPE_RX_ICU) +DECLARE_INSTANCE_CHECKER(RXICUState, RX_ICU, + TYPE_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 fce35ac..7a560e9 100644 --- a/include/hw/intc/xlnx-pmu-iomod-intc.h +++ b/include/hw/intc/xlnx-pmu-iomod-intc.h @@ -32,8 +32,8 @@ #define TYPE_XLNX_PMU_IO_INTC "xlnx.pmu_io_intc" typedef struct XlnxPMUIOIntc XlnxPMUIOIntc; -#define XLNX_PMU_IO_INTC(obj) \ - OBJECT_CHECK(XlnxPMUIOIntc, (obj), TYPE_XLNX_PMU_IO_INTC) +DECLARE_INSTANCE_CHECKER(XlnxPMUIOIntc, XLNX_PMU_IO_INTC, + TYPE_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 9044ca5..29c48db 100644 --- a/include/hw/intc/xlnx-zynqmp-ipi.h +++ b/include/hw/intc/xlnx-zynqmp-ipi.h @@ -32,8 +32,8 @@ #define TYPE_XLNX_ZYNQMP_IPI "xlnx.zynqmp_ipi" typedef struct XlnxZynqMPIPI XlnxZynqMPIPI; -#define XLNX_ZYNQMP_IPI(obj) \ - OBJECT_CHECK(XlnxZynqMPIPI, (obj), TYPE_XLNX_ZYNQMP_IPI) +DECLARE_INSTANCE_CHECKER(XlnxZynqMPIPI, XLNX_ZYNQMP_IPI, + TYPE_XLNX_ZYNQMP_IPI) /* This is R_IPI_IDR + 1 */ #define R_XLNX_ZYNQMP_IPI_MAX ((0x1c / 4) + 1) |