summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc
diff options
context:
space:
mode:
authorEduardo Habkost2020-09-16 20:25:19 +0200
committerEduardo Habkost2020-09-18 20:12:32 +0200
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/ppc
parentUse OBJECT_DECLARE_TYPE when possible (diff)
downloadqemu-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/ppc')
-rw-r--r--include/hw/ppc/mac_dbdma.h3
-rw-r--r--include/hw/ppc/openpic.h4
-rw-r--r--include/hw/ppc/pnv_core.h4
-rw-r--r--include/hw/ppc/pnv_pnor.h4
-rw-r--r--include/hw/ppc/pnv_psi.h8
-rw-r--r--include/hw/ppc/spapr.h8
-rw-r--r--include/hw/ppc/spapr_tpm_proxy.h4
-rw-r--r--include/hw/ppc/spapr_vio.h4
-rw-r--r--include/hw/ppc/xive.h12
9 files changed, 13 insertions, 38 deletions
diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h
index 9166d5f758..4a3f644516 100644
--- a/include/hw/ppc/mac_dbdma.h
+++ b/include/hw/ppc/mac_dbdma.h
@@ -178,7 +178,6 @@ void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq,
void DBDMA_kick(DBDMAState *dbdma);
#define TYPE_MAC_DBDMA "mac-dbdma"
-DECLARE_INSTANCE_CHECKER(DBDMAState, MAC_DBDMA,
- TYPE_MAC_DBDMA)
+OBJECT_DECLARE_SIMPLE_TYPE(DBDMAState, MAC_DBDMA)
#endif
diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
index 61908c7858..74ff44bff0 100644
--- a/include/hw/ppc/openpic.h
+++ b/include/hw/ppc/openpic.h
@@ -137,9 +137,7 @@ typedef struct IRQDest {
} IRQDest;
#define TYPE_OPENPIC "openpic"
-typedef struct OpenPICState OpenPICState;
-DECLARE_INSTANCE_CHECKER(OpenPICState, OPENPIC,
- TYPE_OPENPIC)
+OBJECT_DECLARE_SIMPLE_TYPE(OpenPICState, OPENPIC)
struct OpenPICState {
/*< private >*/
diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h
index fc11edee28..f15829dfae 100644
--- a/include/hw/ppc/pnv_core.h
+++ b/include/hw/ppc/pnv_core.h
@@ -62,9 +62,7 @@ static inline PnvCPUState *pnv_cpu_state(PowerPCCPU *cpu)
}
#define TYPE_PNV_QUAD "powernv-cpu-quad"
-typedef struct PnvQuad PnvQuad;
-DECLARE_INSTANCE_CHECKER(PnvQuad, PNV_QUAD,
- TYPE_PNV_QUAD)
+OBJECT_DECLARE_SIMPLE_TYPE(PnvQuad, PNV_QUAD)
struct PnvQuad {
DeviceState parent_obj;
diff --git a/include/hw/ppc/pnv_pnor.h b/include/hw/ppc/pnv_pnor.h
index 1ec4098bb9..99f9a3adfb 100644
--- a/include/hw/ppc/pnv_pnor.h
+++ b/include/hw/ppc/pnv_pnor.h
@@ -16,9 +16,7 @@
#define PNOR_SPI_OFFSET 0x0c000000UL
#define TYPE_PNV_PNOR "pnv-pnor"
-typedef struct PnvPnor PnvPnor;
-DECLARE_INSTANCE_CHECKER(PnvPnor, PNV_PNOR,
- TYPE_PNV_PNOR)
+OBJECT_DECLARE_SIMPLE_TYPE(PnvPnor, PNV_PNOR)
struct PnvPnor {
SysBusDevice parent_obj;
diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h
index a1fe25b3eb..682b09f874 100644
--- a/include/hw/ppc/pnv_psi.h
+++ b/include/hw/ppc/pnv_psi.h
@@ -51,9 +51,7 @@ struct PnvPsi {
};
#define TYPE_PNV8_PSI TYPE_PNV_PSI "-POWER8"
-typedef struct Pnv8Psi Pnv8Psi;
-DECLARE_INSTANCE_CHECKER(Pnv8Psi, PNV8_PSI,
- TYPE_PNV8_PSI)
+OBJECT_DECLARE_SIMPLE_TYPE(Pnv8Psi, PNV8_PSI)
struct Pnv8Psi {
PnvPsi parent;
@@ -62,9 +60,7 @@ struct Pnv8Psi {
};
#define TYPE_PNV9_PSI TYPE_PNV_PSI "-POWER9"
-typedef struct Pnv9Psi Pnv9Psi;
-DECLARE_INSTANCE_CHECKER(Pnv9Psi, PNV9_PSI,
- TYPE_PNV9_PSI)
+OBJECT_DECLARE_SIMPLE_TYPE(Pnv9Psi, PNV9_PSI)
struct Pnv9Psi {
PnvPsi parent;
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index eea7ac8624..194f3b9d07 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -28,9 +28,7 @@ typedef struct SpaprPendingHpt SpaprPendingHpt;
#define TYPE_SPAPR_RTC "spapr-rtc"
-typedef struct SpaprRtcState SpaprRtcState;
-DECLARE_INSTANCE_CHECKER(SpaprRtcState, SPAPR_RTC,
- TYPE_SPAPR_RTC)
+OBJECT_DECLARE_SIMPLE_TYPE(SpaprRtcState, SPAPR_RTC)
struct SpaprRtcState {
/*< private >*/
@@ -781,11 +779,9 @@ static inline void spapr_dt_irq(uint32_t *intspec, int irq, bool is_lsi)
intspec[1] = is_lsi ? cpu_to_be32(1) : 0;
}
-typedef struct SpaprTceTable SpaprTceTable;
#define TYPE_SPAPR_TCE_TABLE "spapr-tce-table"
-DECLARE_INSTANCE_CHECKER(SpaprTceTable, SPAPR_TCE_TABLE,
- TYPE_SPAPR_TCE_TABLE)
+OBJECT_DECLARE_SIMPLE_TYPE(SpaprTceTable, SPAPR_TCE_TABLE)
#define TYPE_SPAPR_IOMMU_MEMORY_REGION "spapr-iommu-memory-region"
DECLARE_INSTANCE_CHECKER(IOMMUMemoryRegion, SPAPR_IOMMU_MEMORY_REGION,
diff --git a/include/hw/ppc/spapr_tpm_proxy.h b/include/hw/ppc/spapr_tpm_proxy.h
index 300c81b1f0..96d2a9697e 100644
--- a/include/hw/ppc/spapr_tpm_proxy.h
+++ b/include/hw/ppc/spapr_tpm_proxy.h
@@ -17,9 +17,7 @@
#include "hw/qdev-core.h"
#define TYPE_SPAPR_TPM_PROXY "spapr-tpm-proxy"
-typedef struct SpaprTpmProxy SpaprTpmProxy;
-DECLARE_INSTANCE_CHECKER(SpaprTpmProxy, SPAPR_TPM_PROXY,
- TYPE_SPAPR_TPM_PROXY)
+OBJECT_DECLARE_SIMPLE_TYPE(SpaprTpmProxy, SPAPR_TPM_PROXY)
struct SpaprTpmProxy {
/*< private >*/
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index aae03ea6ab..356751e2d7 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -32,9 +32,7 @@ OBJECT_DECLARE_TYPE(SpaprVioDevice, SpaprVioDeviceClass,
VIO_SPAPR_DEVICE)
#define TYPE_SPAPR_VIO_BUS "spapr-vio-bus"
-typedef struct SpaprVioBus SpaprVioBus;
-DECLARE_INSTANCE_CHECKER(SpaprVioBus, SPAPR_VIO_BUS,
- TYPE_SPAPR_VIO_BUS)
+OBJECT_DECLARE_SIMPLE_TYPE(SpaprVioBus, SPAPR_VIO_BUS)
#define TYPE_SPAPR_VIO_BRIDGE "spapr-vio-bridge"
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 26771bb2b3..445eccfe6b 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -168,9 +168,7 @@ struct XiveNotifierClass {
*/
#define TYPE_XIVE_SOURCE "xive-source"
-typedef struct XiveSource XiveSource;
-DECLARE_INSTANCE_CHECKER(XiveSource, XIVE_SOURCE,
- TYPE_XIVE_SOURCE)
+OBJECT_DECLARE_SIMPLE_TYPE(XiveSource, XIVE_SOURCE)
/*
* XIVE Interrupt Source characteristics, which define how the ESB are
@@ -306,9 +304,7 @@ void xive_source_set_irq(void *opaque, int srcno, int val);
*/
#define TYPE_XIVE_TCTX "xive-tctx"
-typedef struct XiveTCTX XiveTCTX;
-DECLARE_INSTANCE_CHECKER(XiveTCTX, XIVE_TCTX,
- TYPE_XIVE_TCTX)
+OBJECT_DECLARE_SIMPLE_TYPE(XiveTCTX, XIVE_TCTX)
/*
* XIVE Thread interrupt Management register rings :
@@ -433,9 +429,7 @@ struct XiveFabricClass {
*/
#define TYPE_XIVE_END_SOURCE "xive-end-source"
-typedef struct XiveENDSource XiveENDSource;
-DECLARE_INSTANCE_CHECKER(XiveENDSource, XIVE_END_SOURCE,
- TYPE_XIVE_END_SOURCE)
+OBJECT_DECLARE_SIMPLE_TYPE(XiveENDSource, XIVE_END_SOURCE)
struct XiveENDSource {
DeviceState parent;