aboutsummaryrefslogtreecommitdiff
path: root/include/hw/display
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/display
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.bz2
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>
Diffstat (limited to 'include/hw/display')
-rw-r--r--include/hw/display/bcm2835_fb.h3
-rw-r--r--include/hw/display/dpcd.h3
-rw-r--r--include/hw/display/i2c-ddc.h3
-rw-r--r--include/hw/display/macfb.h12
-rw-r--r--include/hw/display/xlnx_dp.h3
5 files changed, 12 insertions, 12 deletions
diff --git a/include/hw/display/bcm2835_fb.h b/include/hw/display/bcm2835_fb.h
index 5fc4d74..226d77a 100644
--- a/include/hw/display/bcm2835_fb.h
+++ b/include/hw/display/bcm2835_fb.h
@@ -18,7 +18,8 @@
#define TYPE_BCM2835_FB "bcm2835-fb"
typedef struct BCM2835FBState BCM2835FBState;
-#define BCM2835_FB(obj) OBJECT_CHECK(BCM2835FBState, (obj), TYPE_BCM2835_FB)
+DECLARE_INSTANCE_CHECKER(BCM2835FBState, BCM2835_FB,
+ TYPE_BCM2835_FB)
/*
* Configuration information about the fb which the guest can program
diff --git a/include/hw/display/dpcd.h b/include/hw/display/dpcd.h
index 6b96a46..09304dd 100644
--- a/include/hw/display/dpcd.h
+++ b/include/hw/display/dpcd.h
@@ -29,7 +29,8 @@
typedef struct DPCDState DPCDState;
#define TYPE_DPCD "dpcd"
-#define DPCD(obj) OBJECT_CHECK(DPCDState, (obj), TYPE_DPCD)
+DECLARE_INSTANCE_CHECKER(DPCDState, DPCD,
+ TYPE_DPCD)
/* DCPD Revision. */
#define DPCD_REVISION 0x00
diff --git a/include/hw/display/i2c-ddc.h b/include/hw/display/i2c-ddc.h
index 8ab5064..fbabfea 100644
--- a/include/hw/display/i2c-ddc.h
+++ b/include/hw/display/i2c-ddc.h
@@ -37,6 +37,7 @@ struct I2CDDCState {
typedef struct I2CDDCState I2CDDCState;
#define TYPE_I2CDDC "i2c-ddc"
-#define I2CDDC(obj) OBJECT_CHECK(I2CDDCState, (obj), TYPE_I2CDDC)
+DECLARE_INSTANCE_CHECKER(I2CDDCState, I2CDDC,
+ TYPE_I2CDDC)
#endif /* I2C_DDC_H */
diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h
index d330ee9..0960480 100644
--- a/include/hw/display/macfb.h
+++ b/include/hw/display/macfb.h
@@ -33,8 +33,8 @@ typedef struct MacfbState {
#define TYPE_MACFB "sysbus-macfb"
typedef struct MacfbSysBusState MacfbSysBusState;
-#define MACFB(obj) \
- OBJECT_CHECK(MacfbSysBusState, (obj), TYPE_MACFB)
+DECLARE_INSTANCE_CHECKER(MacfbSysBusState, MACFB,
+ TYPE_MACFB)
struct MacfbSysBusState {
SysBusDevice busdev;
@@ -45,10 +45,8 @@ struct MacfbSysBusState {
#define TYPE_NUBUS_MACFB "nubus-macfb"
typedef struct MacfbNubusDeviceClass MacfbNubusDeviceClass;
typedef struct MacfbNubusState MacfbNubusState;
-#define NUBUS_MACFB_CLASS(class) \
- OBJECT_CLASS_CHECK(MacfbNubusDeviceClass, (class), TYPE_NUBUS_MACFB)
-#define NUBUS_MACFB_GET_CLASS(obj) \
- OBJECT_GET_CLASS(MacfbNubusDeviceClass, (obj), TYPE_NUBUS_MACFB)
+DECLARE_OBJ_CHECKERS(MacfbNubusState, MacfbNubusDeviceClass,
+ NUBUS_MACFB, TYPE_NUBUS_MACFB)
struct MacfbNubusDeviceClass {
DeviceClass parent_class;
@@ -56,8 +54,6 @@ struct MacfbNubusDeviceClass {
DeviceRealize parent_realize;
};
-#define NUBUS_MACFB(obj) \
- OBJECT_CHECK(MacfbNubusState, (obj), TYPE_NUBUS_MACFB)
struct MacfbNubusState {
NubusDevice busdev;
diff --git a/include/hw/display/xlnx_dp.h b/include/hw/display/xlnx_dp.h
index f76bde2..3b7d9e5 100644
--- a/include/hw/display/xlnx_dp.h
+++ b/include/hw/display/xlnx_dp.h
@@ -106,6 +106,7 @@ struct XlnxDPState {
typedef struct XlnxDPState XlnxDPState;
#define TYPE_XLNX_DP "xlnx.v-dp"
-#define XLNX_DP(obj) OBJECT_CHECK(XlnxDPState, (obj), TYPE_XLNX_DP)
+DECLARE_INSTANCE_CHECKER(XlnxDPState, XLNX_DP,
+ TYPE_XLNX_DP)
#endif