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/dma | |
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/dma')
-rw-r--r-- | hw/dma/i82374.c | 4 | ||||
-rw-r--r-- | hw/dma/pl330.c | 3 | ||||
-rw-r--r-- | hw/dma/puv3_dma.c | 4 | ||||
-rw-r--r-- | hw/dma/pxa2xx_dma.c | 4 | ||||
-rw-r--r-- | hw/dma/rc4030.c | 4 | ||||
-rw-r--r-- | hw/dma/xilinx_axidma.c | 4 |
6 files changed, 6 insertions, 17 deletions
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 5b7ff635f7..34c3aaf7d3 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -32,9 +32,7 @@ #include "qom/object.h" #define TYPE_I82374 "i82374" -typedef struct I82374State I82374State; -DECLARE_INSTANCE_CHECKER(I82374State, I82374, - TYPE_I82374) +OBJECT_DECLARE_SIMPLE_TYPE(I82374State, I82374) //#define DEBUG_I82374 diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 859586fd2f..944ba296b0 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -272,8 +272,7 @@ struct PL330State { }; #define TYPE_PL330 "pl330" -DECLARE_INSTANCE_CHECKER(PL330State, PL330, - TYPE_PL330) +OBJECT_DECLARE_SIMPLE_TYPE(PL330State, PL330) static const VMStateDescription vmstate_pl330 = { .name = "pl330", diff --git a/hw/dma/puv3_dma.c b/hw/dma/puv3_dma.c index 825e3dc0ac..cca1e9ec21 100644 --- a/hw/dma/puv3_dma.c +++ b/hw/dma/puv3_dma.c @@ -23,9 +23,7 @@ #define PUV3_DMA_CH(offset) ((offset) >> 8) #define TYPE_PUV3_DMA "puv3_dma" -typedef struct PUV3DMAState PUV3DMAState; -DECLARE_INSTANCE_CHECKER(PUV3DMAState, PUV3_DMA, - TYPE_PUV3_DMA) +OBJECT_DECLARE_SIMPLE_TYPE(PUV3DMAState, PUV3_DMA) struct PUV3DMAState { SysBusDevice parent_obj; diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c index 4f6c0e5e5e..b3707ff3de 100644 --- a/hw/dma/pxa2xx_dma.c +++ b/hw/dma/pxa2xx_dma.c @@ -35,9 +35,7 @@ typedef struct { } PXA2xxDMAChannel; #define TYPE_PXA2XX_DMA "pxa2xx-dma" -typedef struct PXA2xxDMAState PXA2xxDMAState; -DECLARE_INSTANCE_CHECKER(PXA2xxDMAState, PXA2XX_DMA, - TYPE_PXA2XX_DMA) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxDMAState, PXA2XX_DMA) struct PXA2xxDMAState { SysBusDevice parent_obj; diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index c584815d06..e4d2f1725b 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -56,9 +56,7 @@ typedef struct dma_pagetable_entry { #define DMA_FLAG_ADDR_INTR 0x0400 #define TYPE_RC4030 "rc4030" -typedef struct rc4030State rc4030State; -DECLARE_INSTANCE_CHECKER(rc4030State, RC4030, - TYPE_RC4030) +OBJECT_DECLARE_SIMPLE_TYPE(rc4030State, RC4030) #define TYPE_RC4030_IOMMU_MEMORY_REGION "rc4030-iommu-memory-region" diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 498fc17d8a..0a7f5acb4b 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -43,9 +43,7 @@ #define TYPE_XILINX_AXI_DMA_DATA_STREAM "xilinx-axi-dma-data-stream" #define TYPE_XILINX_AXI_DMA_CONTROL_STREAM "xilinx-axi-dma-control-stream" -typedef struct XilinxAXIDMA XilinxAXIDMA; -DECLARE_INSTANCE_CHECKER(XilinxAXIDMA, XILINX_AXI_DMA, - TYPE_XILINX_AXI_DMA) +OBJECT_DECLARE_SIMPLE_TYPE(XilinxAXIDMA, XILINX_AXI_DMA) typedef struct XilinxAXIDMAStreamSlave XilinxAXIDMAStreamSlave; DECLARE_INSTANCE_CHECKER(XilinxAXIDMAStreamSlave, XILINX_AXI_DMA_DATA_STREAM, |