diff mbox series

[v3,70/74,automated] Use OBJECT_DECLARE_TYPE where possible (pass 2)

Message ID 20200825192110.3528606-71-ehabkost@redhat.com
State New
Headers show
Series [v3,01/74] e1000: Rename QOM class cast macros | expand

Commit Message

Eduardo Habkost Aug. 25, 2020, 7:21 p.m. UTC
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the
typedefs can be safely removed.

Generated running:

$ ./scripts/codeconverter/converter.py -i \
  --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]')

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v2 -> v3: this is a new patch added in series v3

The script was re-run after rebase and after additional patches
were added to this series.

This is being submitted as a separate patch to make review
easier, but it can be squashed into the previous patch once it
gets reviewed.

---
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org
---
 include/hw/ppc/xive.h | 6 ++----
 target/rx/cpu-qom.h   | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 48595ab641..482fafccfd 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -345,12 +345,10 @@  struct XiveRouter {
 
     XiveFabric *xfb;
 };
-typedef struct XiveRouter XiveRouter;
 
 #define TYPE_XIVE_ROUTER "xive-router"
-typedef struct XiveRouterClass XiveRouterClass;
-DECLARE_OBJ_CHECKERS(XiveRouter, XiveRouterClass,
-                     XIVE_ROUTER, TYPE_XIVE_ROUTER)
+OBJECT_DECLARE_TYPE(XiveRouter, XiveRouterClass,
+                    xive_router, XIVE_ROUTER)
 
 struct XiveRouterClass {
     SysBusDeviceClass parent;
diff --git a/target/rx/cpu-qom.h b/target/rx/cpu-qom.h
index 05f5773ab1..6c5321078d 100644
--- a/target/rx/cpu-qom.h
+++ b/target/rx/cpu-qom.h
@@ -26,10 +26,8 @@ 
 
 #define TYPE_RX62N_CPU RX_CPU_TYPE_NAME("rx62n")
 
-typedef struct RXCPU RXCPU;
-typedef struct RXCPUClass RXCPUClass;
-DECLARE_OBJ_CHECKERS(RXCPU, RXCPUClass,
-                     RX_CPU, TYPE_RX_CPU)
+OBJECT_DECLARE_TYPE(RXCPU, RXCPUClass,
+                    rx_cpu, RX_CPU)
 
 /*
  * RXCPUClass: