qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	qemu-ppc@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PATCH v4 16/18] [automated] Use OBJECT_DECLARE_TYPE where possible (pass 2)
Date: Mon, 31 Aug 2020 17:07:38 -0400	[thread overview]
Message-ID: <20200831210740.126168-17-ehabkost@redhat.com> (raw)
In-Reply-To: <20200831210740.126168-1-ehabkost@redhat.com>

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 v3 -> v4: none

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 --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:
-- 
2.26.2



  parent reply	other threads:[~2020-08-31 21:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 21:07 [PATCH v4 00/18] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 01/18] qom: make object_ref/unref use a void * instead of Object * Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 02/18] qom: provide convenient macros for declaring and defining types Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 03/18] qom: Allow class type name to be specified in OBJECT_DECLARE* Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 04/18] qom: DECLARE_*_CHECKERS macros Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 05/18] qom: Make type checker functions accept const pointers Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 06/18] codeconverter: script for automating QOM code cleanups Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 07/18] [automated] Delete duplicate QOM typedefs Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 08/18] [automated] Move QOM typedefs and add missing includes Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 09/18] [automated] Move QOM typedefs and add missing includes (pass 2) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 10/18] [automated] Move QOM typedefs and add missing includes (pass 3) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 11/18] [automated] Use DECLARE_*CHECKER* macros Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 12/18] [automated] Use DECLARE_*CHECKER* macros (pass 2) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 13/18] [automated] Use DECLARE_*CHECKER* macros (pass 3) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 14/18] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 15/18] [automated] Use OBJECT_DECLARE_TYPE where possible Eduardo Habkost
2020-08-31 21:07 ` Eduardo Habkost [this message]
2020-08-31 21:07 ` [PATCH v4 17/18] [automated] Use OBJECT_DECLARE_TYPE where possible (pass 3) Eduardo Habkost
2020-08-31 21:07 ` [PATCH v4 18/18] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible Eduardo Habkost
2020-09-02 16:57 ` [PATCH v4 00/18] qom: Automated conversion of type checking boilerplate Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200831210740.126168-17-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).