summaryrefslogtreecommitdiffstats
path: root/include/hw/sparc
diff options
context:
space:
mode:
authorEduardo Habkost2020-08-31 23:07:33 +0200
committerEduardo Habkost2020-09-09 15:27:09 +0200
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/sparc
parentMove QOM typedefs and add missing includes (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.xz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
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/sparc')
-rw-r--r--include/hw/sparc/sparc32_dma.h16
-rw-r--r--include/hw/sparc/sun4m_iommu.h3
-rw-r--r--include/hw/sparc/sun4u_iommu.h3
3 files changed, 12 insertions, 10 deletions
diff --git a/include/hw/sparc/sparc32_dma.h b/include/hw/sparc/sparc32_dma.h
index 9c80ef54ff..a402665a9c 100644
--- a/include/hw/sparc/sparc32_dma.h
+++ b/include/hw/sparc/sparc32_dma.h
@@ -10,8 +10,8 @@
#define TYPE_SPARC32_DMA_DEVICE "sparc32-dma-device"
typedef struct DMADeviceState DMADeviceState;
-#define SPARC32_DMA_DEVICE(obj) OBJECT_CHECK(DMADeviceState, (obj), \
- TYPE_SPARC32_DMA_DEVICE)
+DECLARE_INSTANCE_CHECKER(DMADeviceState, SPARC32_DMA_DEVICE,
+ TYPE_SPARC32_DMA_DEVICE)
struct DMADeviceState {
@@ -26,8 +26,8 @@ struct DMADeviceState {
#define TYPE_SPARC32_ESPDMA_DEVICE "sparc32-espdma"
typedef struct ESPDMADeviceState ESPDMADeviceState;
-#define SPARC32_ESPDMA_DEVICE(obj) OBJECT_CHECK(ESPDMADeviceState, (obj), \
- TYPE_SPARC32_ESPDMA_DEVICE)
+DECLARE_INSTANCE_CHECKER(ESPDMADeviceState, SPARC32_ESPDMA_DEVICE,
+ TYPE_SPARC32_ESPDMA_DEVICE)
struct ESPDMADeviceState {
DMADeviceState parent_obj;
@@ -37,8 +37,8 @@ struct ESPDMADeviceState {
#define TYPE_SPARC32_LEDMA_DEVICE "sparc32-ledma"
typedef struct LEDMADeviceState LEDMADeviceState;
-#define SPARC32_LEDMA_DEVICE(obj) OBJECT_CHECK(LEDMADeviceState, (obj), \
- TYPE_SPARC32_LEDMA_DEVICE)
+DECLARE_INSTANCE_CHECKER(LEDMADeviceState, SPARC32_LEDMA_DEVICE,
+ TYPE_SPARC32_LEDMA_DEVICE)
struct LEDMADeviceState {
DMADeviceState parent_obj;
@@ -48,8 +48,8 @@ struct LEDMADeviceState {
#define TYPE_SPARC32_DMA "sparc32-dma"
typedef struct SPARC32DMAState SPARC32DMAState;
-#define SPARC32_DMA(obj) OBJECT_CHECK(SPARC32DMAState, (obj), \
- TYPE_SPARC32_DMA)
+DECLARE_INSTANCE_CHECKER(SPARC32DMAState, SPARC32_DMA,
+ TYPE_SPARC32_DMA)
struct SPARC32DMAState {
SysBusDevice parent_obj;
diff --git a/include/hw/sparc/sun4m_iommu.h b/include/hw/sparc/sun4m_iommu.h
index 6095eed0af..4e2ab34cde 100644
--- a/include/hw/sparc/sun4m_iommu.h
+++ b/include/hw/sparc/sun4m_iommu.h
@@ -45,7 +45,8 @@ struct IOMMUState {
typedef struct IOMMUState IOMMUState;
#define TYPE_SUN4M_IOMMU "sun4m-iommu"
-#define SUN4M_IOMMU(obj) OBJECT_CHECK(IOMMUState, (obj), TYPE_SUN4M_IOMMU)
+DECLARE_INSTANCE_CHECKER(IOMMUState, SUN4M_IOMMU,
+ TYPE_SUN4M_IOMMU)
#define TYPE_SUN4M_IOMMU_MEMORY_REGION "sun4m-iommu-memory-region"
diff --git a/include/hw/sparc/sun4u_iommu.h b/include/hw/sparc/sun4u_iommu.h
index dfe10459e5..f94566a72c 100644
--- a/include/hw/sparc/sun4u_iommu.h
+++ b/include/hw/sparc/sun4u_iommu.h
@@ -44,7 +44,8 @@ struct IOMMUState {
typedef struct IOMMUState IOMMUState;
#define TYPE_SUN4U_IOMMU "sun4u-iommu"
-#define SUN4U_IOMMU(obj) OBJECT_CHECK(IOMMUState, (obj), TYPE_SUN4U_IOMMU)
+DECLARE_INSTANCE_CHECKER(IOMMUState, SUN4U_IOMMU,
+ TYPE_SUN4U_IOMMU)
#define TYPE_SUN4U_IOMMU_MEMORY_REGION "sun4u-iommu-memory-region"