From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 04/17] sifive: Use DECLARE_*CHECKER* macros
Date: Fri, 18 Sep 2020 16:47:01 -0400 [thread overview]
Message-ID: <20200918204714.27276-5-ehabkost@redhat.com> (raw)
In-Reply-To: <20200918204714.27276-1-ehabkost@redhat.com>
$ ./scripts/codeconverter/converter.py -i \
--pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/intc/sifive_plic.h | 4 ++--
include/hw/char/sifive_uart.h | 4 ++--
include/hw/gpio/sifive_gpio.h | 3 ++-
include/hw/misc/sifive_e_prci.h | 4 ++--
include/hw/misc/sifive_test.h | 4 ++--
include/hw/misc/sifive_u_otp.h | 4 ++--
include/hw/misc/sifive_u_prci.h | 4 ++--
7 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/hw/intc/sifive_plic.h b/hw/intc/sifive_plic.h
index aa6ae13c3a..b75b1f145d 100644
--- a/hw/intc/sifive_plic.h
+++ b/hw/intc/sifive_plic.h
@@ -27,8 +27,8 @@
#define TYPE_SIFIVE_PLIC "riscv.sifive.plic"
typedef struct SiFivePLICState SiFivePLICState;
-#define SIFIVE_PLIC(obj) \
- OBJECT_CHECK(SiFivePLICState, (obj), TYPE_SIFIVE_PLIC)
+DECLARE_INSTANCE_CHECKER(SiFivePLICState, SIFIVE_PLIC,
+ TYPE_SIFIVE_PLIC)
typedef enum PLICMode {
PLICMode_U,
diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h
index 2bb72ac80b..3e962be659 100644
--- a/include/hw/char/sifive_uart.h
+++ b/include/hw/char/sifive_uart.h
@@ -53,8 +53,8 @@ enum {
#define TYPE_SIFIVE_UART "riscv.sifive.uart"
typedef struct SiFiveUARTState SiFiveUARTState;
-#define SIFIVE_UART(obj) \
- OBJECT_CHECK(SiFiveUARTState, (obj), TYPE_SIFIVE_UART)
+DECLARE_INSTANCE_CHECKER(SiFiveUARTState, SIFIVE_UART,
+ TYPE_SIFIVE_UART)
struct SiFiveUARTState {
/*< private >*/
diff --git a/include/hw/gpio/sifive_gpio.h b/include/hw/gpio/sifive_gpio.h
index af991fa44e..fc53785c9d 100644
--- a/include/hw/gpio/sifive_gpio.h
+++ b/include/hw/gpio/sifive_gpio.h
@@ -19,7 +19,8 @@
#define TYPE_SIFIVE_GPIO "sifive_soc.gpio"
typedef struct SIFIVEGPIOState SIFIVEGPIOState;
-#define SIFIVE_GPIO(obj) OBJECT_CHECK(SIFIVEGPIOState, (obj), TYPE_SIFIVE_GPIO)
+DECLARE_INSTANCE_CHECKER(SIFIVEGPIOState, SIFIVE_GPIO,
+ TYPE_SIFIVE_GPIO)
#define SIFIVE_GPIO_PINS 32
diff --git a/include/hw/misc/sifive_e_prci.h b/include/hw/misc/sifive_e_prci.h
index de1e502eea..262ca16181 100644
--- a/include/hw/misc/sifive_e_prci.h
+++ b/include/hw/misc/sifive_e_prci.h
@@ -53,8 +53,8 @@ enum {
#define TYPE_SIFIVE_E_PRCI "riscv.sifive.e.prci"
typedef struct SiFiveEPRCIState SiFiveEPRCIState;
-#define SIFIVE_E_PRCI(obj) \
- OBJECT_CHECK(SiFiveEPRCIState, (obj), TYPE_SIFIVE_E_PRCI)
+DECLARE_INSTANCE_CHECKER(SiFiveEPRCIState, SIFIVE_E_PRCI,
+ TYPE_SIFIVE_E_PRCI)
struct SiFiveEPRCIState {
/*< private >*/
diff --git a/include/hw/misc/sifive_test.h b/include/hw/misc/sifive_test.h
index dc54b7af0c..88a38d00c5 100644
--- a/include/hw/misc/sifive_test.h
+++ b/include/hw/misc/sifive_test.h
@@ -25,8 +25,8 @@
#define TYPE_SIFIVE_TEST "riscv.sifive.test"
typedef struct SiFiveTestState SiFiveTestState;
-#define SIFIVE_TEST(obj) \
- OBJECT_CHECK(SiFiveTestState, (obj), TYPE_SIFIVE_TEST)
+DECLARE_INSTANCE_CHECKER(SiFiveTestState, SIFIVE_TEST,
+ TYPE_SIFIVE_TEST)
struct SiFiveTestState {
/*< private >*/
diff --git a/include/hw/misc/sifive_u_otp.h b/include/hw/misc/sifive_u_otp.h
index 4572534f50..82c9176c8f 100644
--- a/include/hw/misc/sifive_u_otp.h
+++ b/include/hw/misc/sifive_u_otp.h
@@ -51,8 +51,8 @@
#define TYPE_SIFIVE_U_OTP "riscv.sifive.u.otp"
typedef struct SiFiveUOTPState SiFiveUOTPState;
-#define SIFIVE_U_OTP(obj) \
- OBJECT_CHECK(SiFiveUOTPState, (obj), TYPE_SIFIVE_U_OTP)
+DECLARE_INSTANCE_CHECKER(SiFiveUOTPState, SIFIVE_U_OTP,
+ TYPE_SIFIVE_U_OTP)
struct SiFiveUOTPState {
/*< private >*/
diff --git a/include/hw/misc/sifive_u_prci.h b/include/hw/misc/sifive_u_prci.h
index 83eab43686..d9ebf40b7f 100644
--- a/include/hw/misc/sifive_u_prci.h
+++ b/include/hw/misc/sifive_u_prci.h
@@ -60,8 +60,8 @@
#define TYPE_SIFIVE_U_PRCI "riscv.sifive.u.prci"
typedef struct SiFiveUPRCIState SiFiveUPRCIState;
-#define SIFIVE_U_PRCI(obj) \
- OBJECT_CHECK(SiFiveUPRCIState, (obj), TYPE_SIFIVE_U_PRCI)
+DECLARE_INSTANCE_CHECKER(SiFiveUPRCIState, SIFIVE_U_PRCI,
+ TYPE_SIFIVE_U_PRCI)
struct SiFiveUPRCIState {
/*< private >*/
--
2.26.2
next prev parent reply other threads:[~2020-09-18 20:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 20:46 [PULL 00/17] QOM queue, 2020-09-18 Eduardo Habkost
2020-09-18 20:46 ` [PULL 01/17] sifive_e: Rename memmap enum constants Eduardo Habkost
2020-09-18 20:46 ` [PULL 02/17] sifive_u: " Eduardo Habkost
2020-09-18 20:47 ` [PULL 03/17] sifive: Move QOM typedefs and add missing includes Eduardo Habkost
2020-09-18 20:47 ` Eduardo Habkost [this message]
2020-09-18 20:47 ` [PULL 05/17] qom: Correct object_class_dynamic_cast_assert() documentation Eduardo Habkost
2020-09-18 20:47 ` [PULL 06/17] qom: Clean up object_property_get_enum()'s error value Eduardo Habkost
2020-09-18 20:47 ` [PULL 07/17] qom: Correct error values in two contracts Eduardo Habkost
2020-09-18 20:47 ` [PULL 08/17] qom: Allow objects to be allocated with increased alignment Eduardo Habkost
2020-09-18 20:47 ` [PULL 09/17] target/arm: Set instance_align on CPUARM TypeInfo Eduardo Habkost
2020-09-18 20:47 ` [PULL 10/17] target/ppc: Set instance_align on PowerPCCPU TypeInfo Eduardo Habkost
2020-09-18 20:47 ` [PULL 11/17] target/riscv: Set instance_align on RISCVCPU TypeInfo Eduardo Habkost
2020-09-18 20:47 ` [PULL 12/17] target/s390x: Set instance_align on S390CPU TypeInfo Eduardo Habkost
2020-09-18 20:47 ` [PULL 13/17] scripts/codeconverter: Update to latest version Eduardo Habkost
2020-09-18 20:47 ` [PULL 14/17] qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE Eduardo Habkost
2020-09-18 20:47 ` [PULL 15/17] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros Eduardo Habkost
2020-09-18 20:47 ` [PULL 16/17] Use OBJECT_DECLARE_TYPE when possible Eduardo Habkost
2020-09-18 20:47 ` [PULL 17/17] Use OBJECT_DECLARE_SIMPLE_TYPE " Eduardo Habkost
2020-09-18 22:35 ` [PULL 00/17] QOM queue, 2020-09-18 no-reply
2020-09-18 23:23 ` no-reply
2020-09-18 23:43 ` no-reply
2020-09-19 0:23 ` no-reply
2020-09-19 0:43 ` no-reply
2020-09-19 1:32 ` no-reply
2020-09-19 1:43 ` no-reply
2020-09-19 1:57 ` no-reply
2020-09-19 2:36 ` no-reply
2020-09-22 14:42 ` Peter Maydell
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=20200918204714.27276-5-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).