Use DECLARE_*CHECKER* macros

Generated using:

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

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-13-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-14-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 db1015e92e
commit 8110fa1d94
791 changed files with 1987 additions and 2423 deletions

View file

@ -31,7 +31,8 @@
#define TYPE_DS1338 "ds1338"
typedef struct DS1338State DS1338State;
#define DS1338(obj) OBJECT_CHECK(DS1338State, (obj), TYPE_DS1338)
DECLARE_INSTANCE_CHECKER(DS1338State, DS1338,
TYPE_DS1338)
struct DS1338State {
I2CSlave parent_obj;

View file

@ -86,8 +86,8 @@
#define TYPE_EXYNOS4210_RTC "exynos4210.rtc"
typedef struct Exynos4210RTCState Exynos4210RTCState;
#define EXYNOS4210_RTC(obj) \
OBJECT_CHECK(Exynos4210RTCState, (obj), TYPE_EXYNOS4210_RTC)
DECLARE_INSTANCE_CHECKER(Exynos4210RTCState, EXYNOS4210_RTC,
TYPE_EXYNOS4210_RTC)
struct Exynos4210RTCState {
SysBusDevice parent_obj;

View file

@ -18,7 +18,8 @@
#define TYPE_M41T80 "m41t80"
typedef struct M41t80State M41t80State;
#define M41T80(obj) OBJECT_CHECK(M41t80State, (obj), TYPE_M41T80)
DECLARE_INSTANCE_CHECKER(M41t80State, M41T80,
TYPE_M41T80)
struct M41t80State {
I2CSlave parent_obj;

View file

@ -35,12 +35,8 @@
#define TYPE_M48TXX_ISA "isa-m48txx"
typedef struct M48txxISADeviceClass M48txxISADeviceClass;
typedef struct M48txxISAState M48txxISAState;
#define M48TXX_ISA_GET_CLASS(obj) \
OBJECT_GET_CLASS(M48txxISADeviceClass, (obj), TYPE_M48TXX_ISA)
#define M48TXX_ISA_CLASS(klass) \
OBJECT_CLASS_CHECK(M48txxISADeviceClass, (klass), TYPE_M48TXX_ISA)
#define M48TXX_ISA(obj) \
OBJECT_CHECK(M48txxISAState, (obj), TYPE_M48TXX_ISA)
DECLARE_OBJ_CHECKERS(M48txxISAState, M48txxISADeviceClass,
M48TXX_ISA, TYPE_M48TXX_ISA)
struct M48txxISAState {
ISADevice parent_obj;

View file

@ -45,12 +45,8 @@
#define TYPE_M48TXX_SYS_BUS "sysbus-m48txx"
typedef struct M48txxSysBusDeviceClass M48txxSysBusDeviceClass;
typedef struct M48txxSysBusState M48txxSysBusState;
#define M48TXX_SYS_BUS_GET_CLASS(obj) \
OBJECT_GET_CLASS(M48txxSysBusDeviceClass, (obj), TYPE_M48TXX_SYS_BUS)
#define M48TXX_SYS_BUS_CLASS(klass) \
OBJECT_CLASS_CHECK(M48txxSysBusDeviceClass, (klass), TYPE_M48TXX_SYS_BUS)
#define M48TXX_SYS_BUS(obj) \
OBJECT_CHECK(M48txxSysBusState, (obj), TYPE_M48TXX_SYS_BUS)
DECLARE_OBJ_CHECKERS(M48txxSysBusState, M48txxSysBusDeviceClass,
M48TXX_SYS_BUS, TYPE_M48TXX_SYS_BUS)
/*
* Chipset docs:

View file

@ -21,7 +21,8 @@
#define TYPE_SUN4V_RTC "sun4v_rtc"
typedef struct Sun4vRtc Sun4vRtc;
#define SUN4V_RTC(obj) OBJECT_CHECK(Sun4vRtc, (obj), TYPE_SUN4V_RTC)
DECLARE_INSTANCE_CHECKER(Sun4vRtc, SUN4V_RTC,
TYPE_SUN4V_RTC)
struct Sun4vRtc {
SysBusDevice parent_obj;

View file

@ -35,7 +35,8 @@
#define TYPE_TWL92230 "twl92230"
typedef struct MenelausState MenelausState;
#define TWL92230(obj) OBJECT_CHECK(MenelausState, (obj), TYPE_TWL92230)
DECLARE_INSTANCE_CHECKER(MenelausState, TWL92230,
TYPE_TWL92230)
struct MenelausState {
I2CSlave parent_obj;