sifive: Use DECLARE_*CHECKER* macros

$ ./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>
This commit is contained in:
Eduardo Habkost 2020-08-31 17:07:33 -04:00
parent ac900edeed
commit e38d3c5ce5
7 changed files with 14 additions and 13 deletions

View File

@ -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,

View File

@ -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 >*/

View File

@ -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

View File

@ -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 >*/

View File

@ -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 >*/

View File

@ -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 >*/

View File

@ -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 >*/