aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-16 14:25:19 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 14:12:32 -0400
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /hw/intc
parenta489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (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/intc')
-rw-r--r--hw/intc/arm_gicv2m.c4
-rw-r--r--hw/intc/exynos4210_combiner.c4
-rw-r--r--hw/intc/exynos4210_gic.c8
-rw-r--r--hw/intc/grlib_irqmp.c4
-rw-r--r--hw/intc/lm32_pic.c4
-rw-r--r--hw/intc/nios2_iic.c4
-rw-r--r--hw/intc/ompic.c4
-rw-r--r--hw/intc/openpic_kvm.c4
-rw-r--r--hw/intc/pl190.c4
-rw-r--r--hw/intc/puv3_intc.c4
-rw-r--r--hw/intc/slavio_intctl.c4
11 files changed, 12 insertions, 36 deletions
diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
index 04d7a6d68b..596fa66648 100644
--- a/hw/intc/arm_gicv2m.c
+++ b/hw/intc/arm_gicv2m.c
@@ -37,9 +37,7 @@
#include "qom/object.h"
#define TYPE_ARM_GICV2M "arm-gicv2m"
-typedef struct ARMGICv2mState ARMGICv2mState;
-DECLARE_INSTANCE_CHECKER(ARMGICv2mState, ARM_GICV2M,
- TYPE_ARM_GICV2M)
+OBJECT_DECLARE_SIMPLE_TYPE(ARMGICv2mState, ARM_GICV2M)
#define GICV2M_NUM_SPI_MAX 128
diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index 7b01481ab8..4534ee248d 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -64,9 +64,7 @@ typedef struct CombinerGroupState {
} CombinerGroupState;
#define TYPE_EXYNOS4210_COMBINER "exynos4210.combiner"
-typedef struct Exynos4210CombinerState Exynos4210CombinerState;
-DECLARE_INSTANCE_CHECKER(Exynos4210CombinerState, EXYNOS4210_COMBINER,
- TYPE_EXYNOS4210_COMBINER)
+OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210CombinerState, EXYNOS4210_COMBINER)
struct Exynos4210CombinerState {
SysBusDevice parent_obj;
diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c
index f9487673fc..bc73d1f115 100644
--- a/hw/intc/exynos4210_gic.c
+++ b/hw/intc/exynos4210_gic.c
@@ -265,9 +265,7 @@ uint32_t exynos4210_get_irq(uint32_t grp, uint32_t bit)
/********* GIC part *********/
#define TYPE_EXYNOS4210_GIC "exynos4210.gic"
-typedef struct Exynos4210GicState Exynos4210GicState;
-DECLARE_INSTANCE_CHECKER(Exynos4210GicState, EXYNOS4210_GIC,
- TYPE_EXYNOS4210_GIC)
+OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210GicState, EXYNOS4210_GIC)
struct Exynos4210GicState {
SysBusDevice parent_obj;
@@ -384,9 +382,7 @@ type_init(exynos4210_gic_register_types)
*/
#define TYPE_EXYNOS4210_IRQ_GATE "exynos4210.irq_gate"
-typedef struct Exynos4210IRQGateState Exynos4210IRQGateState;
-DECLARE_INSTANCE_CHECKER(Exynos4210IRQGateState, EXYNOS4210_IRQ_GATE,
- TYPE_EXYNOS4210_IRQ_GATE)
+OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210IRQGateState, EXYNOS4210_IRQ_GATE)
struct Exynos4210IRQGateState {
SysBusDevice parent_obj;
diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
index 9b34a8ae03..ffec4a07ee 100644
--- a/hw/intc/grlib_irqmp.c
+++ b/hw/intc/grlib_irqmp.c
@@ -51,9 +51,7 @@
#define FORCE_OFFSET 0x80
#define EXTENDED_OFFSET 0xC0
-typedef struct IRQMP IRQMP;
-DECLARE_INSTANCE_CHECKER(IRQMP, GRLIB_IRQMP,
- TYPE_GRLIB_IRQMP)
+OBJECT_DECLARE_SIMPLE_TYPE(IRQMP, GRLIB_IRQMP)
typedef struct IRQMPState IRQMPState;
diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c
index e8b4015efd..0c48a9cd85 100644
--- a/hw/intc/lm32_pic.c
+++ b/hw/intc/lm32_pic.c
@@ -30,9 +30,7 @@
#include "qom/object.h"
#define TYPE_LM32_PIC "lm32-pic"
-typedef struct LM32PicState LM32PicState;
-DECLARE_INSTANCE_CHECKER(LM32PicState, LM32_PIC,
- TYPE_LM32_PIC)
+OBJECT_DECLARE_SIMPLE_TYPE(LM32PicState, LM32_PIC)
struct LM32PicState {
SysBusDevice parent_obj;
diff --git a/hw/intc/nios2_iic.c b/hw/intc/nios2_iic.c
index aa26f059a1..216db67059 100644
--- a/hw/intc/nios2_iic.c
+++ b/hw/intc/nios2_iic.c
@@ -28,9 +28,7 @@
#include "qom/object.h"
#define TYPE_ALTERA_IIC "altera,iic"
-typedef struct AlteraIIC AlteraIIC;
-DECLARE_INSTANCE_CHECKER(AlteraIIC, ALTERA_IIC,
- TYPE_ALTERA_IIC)
+OBJECT_DECLARE_SIMPLE_TYPE(AlteraIIC, ALTERA_IIC)
struct AlteraIIC {
SysBusDevice parent_obj;
diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c
index a8ea621d9e..1731a10683 100644
--- a/hw/intc/ompic.c
+++ b/hw/intc/ompic.c
@@ -18,9 +18,7 @@
#include "qom/object.h"
#define TYPE_OR1K_OMPIC "or1k-ompic"
-typedef struct OR1KOMPICState OR1KOMPICState;
-DECLARE_INSTANCE_CHECKER(OR1KOMPICState, OR1K_OMPIC,
- TYPE_OR1K_OMPIC)
+OBJECT_DECLARE_SIMPLE_TYPE(OR1KOMPICState, OR1K_OMPIC)
#define OMPIC_CTRL_IRQ_ACK (1 << 31)
#define OMPIC_CTRL_IRQ_GEN (1 << 30)
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index 8c8fbeddfe..e1a39e33cb 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -39,9 +39,7 @@
#define GCR_RESET 0x80000000
-typedef struct KVMOpenPICState KVMOpenPICState;
-DECLARE_INSTANCE_CHECKER(KVMOpenPICState, KVM_OPENPIC,
- TYPE_KVM_OPENPIC)
+OBJECT_DECLARE_SIMPLE_TYPE(KVMOpenPICState, KVM_OPENPIC)
struct KVMOpenPICState {
/*< private >*/
diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c
index ee3206132f..cd88443601 100644
--- a/hw/intc/pl190.c
+++ b/hw/intc/pl190.c
@@ -22,9 +22,7 @@
#define PL190_NUM_PRIO 17
#define TYPE_PL190 "pl190"
-typedef struct PL190State PL190State;
-DECLARE_INSTANCE_CHECKER(PL190State, PL190,
- TYPE_PL190)
+OBJECT_DECLARE_SIMPLE_TYPE(PL190State, PL190)
struct PL190State {
SysBusDevice parent_obj;
diff --git a/hw/intc/puv3_intc.c b/hw/intc/puv3_intc.c
index 8bceede256..65226f5e7c 100644
--- a/hw/intc/puv3_intc.c
+++ b/hw/intc/puv3_intc.c
@@ -20,9 +20,7 @@
#include "qemu/log.h"
#define TYPE_PUV3_INTC "puv3_intc"
-typedef struct PUV3INTCState PUV3INTCState;
-DECLARE_INSTANCE_CHECKER(PUV3INTCState, PUV3_INTC,
- TYPE_PUV3_INTC)
+OBJECT_DECLARE_SIMPLE_TYPE(PUV3INTCState, PUV3_INTC)
struct PUV3INTCState {
SysBusDevice parent_obj;
diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c
index 4a72ef5d0d..f7e59ba643 100644
--- a/hw/intc/slavio_intctl.c
+++ b/hw/intc/slavio_intctl.c
@@ -59,9 +59,7 @@ typedef struct SLAVIO_CPUINTCTLState {
} SLAVIO_CPUINTCTLState;
#define TYPE_SLAVIO_INTCTL "slavio_intctl"
-typedef struct SLAVIO_INTCTLState SLAVIO_INTCTLState;
-DECLARE_INSTANCE_CHECKER(SLAVIO_INTCTLState, SLAVIO_INTCTL,
- TYPE_SLAVIO_INTCTL)
+OBJECT_DECLARE_SIMPLE_TYPE(SLAVIO_INTCTLState, SLAVIO_INTCTL)
struct SLAVIO_INTCTLState {
SysBusDevice parent_obj;