aboutsummaryrefslogtreecommitdiff
path: root/include/hw/rtc
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/rtc
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/rtc')
-rw-r--r--include/hw/rtc/allwinner-rtc.h8
-rw-r--r--include/hw/rtc/aspeed_rtc.h3
-rw-r--r--include/hw/rtc/goldfish_rtc.h4
-rw-r--r--include/hw/rtc/m48t59.h6
-rw-r--r--include/hw/rtc/mc146818rtc.h3
-rw-r--r--include/hw/rtc/pl031.h3
-rw-r--r--include/hw/rtc/xlnx-zynqmp-rtc.h4
7 files changed, 14 insertions, 17 deletions
diff --git a/include/hw/rtc/allwinner-rtc.h b/include/hw/rtc/allwinner-rtc.h
index 1126e05..5a6e9ff 100644
--- a/include/hw/rtc/allwinner-rtc.h
+++ b/include/hw/rtc/allwinner-rtc.h
@@ -62,12 +62,8 @@
typedef struct AwRtcClass AwRtcClass;
typedef struct AwRtcState AwRtcState;
-#define AW_RTC(obj) \
- OBJECT_CHECK(AwRtcState, (obj), TYPE_AW_RTC)
-#define AW_RTC_CLASS(klass) \
- OBJECT_CLASS_CHECK(AwRtcClass, (klass), TYPE_AW_RTC)
-#define AW_RTC_GET_CLASS(obj) \
- OBJECT_GET_CLASS(AwRtcClass, (obj), TYPE_AW_RTC)
+DECLARE_OBJ_CHECKERS(AwRtcState, AwRtcClass,
+ AW_RTC, TYPE_AW_RTC)
/** @} */
diff --git a/include/hw/rtc/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h
index 295f4a7..d7691ab 100644
--- a/include/hw/rtc/aspeed_rtc.h
+++ b/include/hw/rtc/aspeed_rtc.h
@@ -24,6 +24,7 @@ struct AspeedRtcState {
typedef struct AspeedRtcState AspeedRtcState;
#define TYPE_ASPEED_RTC "aspeed.rtc"
-#define ASPEED_RTC(obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC)
+DECLARE_INSTANCE_CHECKER(AspeedRtcState, ASPEED_RTC,
+ TYPE_ASPEED_RTC)
#endif /* HW_RTC_ASPEED_RTC_H */
diff --git a/include/hw/rtc/goldfish_rtc.h b/include/hw/rtc/goldfish_rtc.h
index f31b0cb..b710c21 100644
--- a/include/hw/rtc/goldfish_rtc.h
+++ b/include/hw/rtc/goldfish_rtc.h
@@ -27,8 +27,8 @@
#define TYPE_GOLDFISH_RTC "goldfish_rtc"
typedef struct GoldfishRTCState GoldfishRTCState;
-#define GOLDFISH_RTC(obj) \
- OBJECT_CHECK(GoldfishRTCState, (obj), TYPE_GOLDFISH_RTC)
+DECLARE_INSTANCE_CHECKER(GoldfishRTCState, GOLDFISH_RTC,
+ TYPE_GOLDFISH_RTC)
struct GoldfishRTCState {
SysBusDevice parent_obj;
diff --git a/include/hw/rtc/m48t59.h b/include/hw/rtc/m48t59.h
index 78aae2c..04abedf 100644
--- a/include/hw/rtc/m48t59.h
+++ b/include/hw/rtc/m48t59.h
@@ -32,10 +32,8 @@
#define TYPE_NVRAM "nvram"
typedef struct NvramClass NvramClass;
-#define NVRAM_CLASS(klass) \
- OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM)
-#define NVRAM_GET_CLASS(obj) \
- OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM)
+DECLARE_CLASS_CHECKERS(NvramClass, NVRAM,
+ TYPE_NVRAM)
#define NVRAM(obj) \
INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
index 7b42d9c..e58e006 100644
--- a/include/hw/rtc/mc146818rtc.h
+++ b/include/hw/rtc/mc146818rtc.h
@@ -17,7 +17,8 @@
#define TYPE_MC146818_RTC "mc146818rtc"
typedef struct RTCState RTCState;
-#define MC146818_RTC(obj) OBJECT_CHECK(RTCState, (obj), TYPE_MC146818_RTC)
+DECLARE_INSTANCE_CHECKER(RTCState, MC146818_RTC,
+ TYPE_MC146818_RTC)
struct RTCState {
ISADevice parent_obj;
diff --git a/include/hw/rtc/pl031.h b/include/hw/rtc/pl031.h
index 3ddf48c..3897b42 100644
--- a/include/hw/rtc/pl031.h
+++ b/include/hw/rtc/pl031.h
@@ -20,7 +20,8 @@
#define TYPE_PL031 "pl031"
typedef struct PL031State PL031State;
-#define PL031(obj) OBJECT_CHECK(PL031State, (obj), TYPE_PL031)
+DECLARE_INSTANCE_CHECKER(PL031State, PL031,
+ TYPE_PL031)
struct PL031State {
SysBusDevice parent_obj;
diff --git a/include/hw/rtc/xlnx-zynqmp-rtc.h b/include/hw/rtc/xlnx-zynqmp-rtc.h
index 95c85d3..209de85 100644
--- a/include/hw/rtc/xlnx-zynqmp-rtc.h
+++ b/include/hw/rtc/xlnx-zynqmp-rtc.h
@@ -34,8 +34,8 @@
#define TYPE_XLNX_ZYNQMP_RTC "xlnx-zynmp.rtc"
typedef struct XlnxZynqMPRTC XlnxZynqMPRTC;
-#define XLNX_ZYNQMP_RTC(obj) \
- OBJECT_CHECK(XlnxZynqMPRTC, (obj), TYPE_XLNX_ZYNQMP_RTC)
+DECLARE_INSTANCE_CHECKER(XlnxZynqMPRTC, XLNX_ZYNQMP_RTC,
+ TYPE_XLNX_ZYNQMP_RTC)
REG32(SET_TIME_WRITE, 0x0)
REG32(SET_TIME_READ, 0x4)