aboutsummaryrefslogtreecommitdiff
path: root/hw/input
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 /hw/input
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 'hw/input')
-rw-r--r--hw/input/adb-kbd.c7
-rw-r--r--hw/input/adb-mouse.c7
-rw-r--r--hw/input/lm832x.c3
-rw-r--r--hw/input/milkymist-softusb.c4
-rw-r--r--hw/input/pl050.c3
5 files changed, 10 insertions, 14 deletions
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index a439bf6..fe0c363 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -34,7 +34,8 @@
typedef struct ADBKeyboardClass ADBKeyboardClass;
typedef struct KBDState KBDState;
-#define ADB_KEYBOARD(obj) OBJECT_CHECK(KBDState, (obj), TYPE_ADB_KEYBOARD)
+DECLARE_OBJ_CHECKERS(KBDState, ADBKeyboardClass,
+ ADB_KEYBOARD, TYPE_ADB_KEYBOARD)
struct KBDState {
/*< private >*/
@@ -45,10 +46,6 @@ struct KBDState {
int rptr, wptr, count;
};
-#define ADB_KEYBOARD_CLASS(class) \
- OBJECT_CLASS_CHECK(ADBKeyboardClass, (class), TYPE_ADB_KEYBOARD)
-#define ADB_KEYBOARD_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ADBKeyboardClass, (obj), TYPE_ADB_KEYBOARD)
struct ADBKeyboardClass {
/*< private >*/
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 8e4cf47..f575090 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -33,7 +33,8 @@
typedef struct ADBMouseClass ADBMouseClass;
typedef struct MouseState MouseState;
-#define ADB_MOUSE(obj) OBJECT_CHECK(MouseState, (obj), TYPE_ADB_MOUSE)
+DECLARE_OBJ_CHECKERS(MouseState, ADBMouseClass,
+ ADB_MOUSE, TYPE_ADB_MOUSE)
struct MouseState {
/*< public >*/
@@ -44,10 +45,6 @@ struct MouseState {
int dx, dy, dz;
};
-#define ADB_MOUSE_CLASS(class) \
- OBJECT_CLASS_CHECK(ADBMouseClass, (class), TYPE_ADB_MOUSE)
-#define ADB_MOUSE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ADBMouseClass, (obj), TYPE_ADB_MOUSE)
struct ADBMouseClass {
/*< public >*/
diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c
index aab94d2..70245fd 100644
--- a/hw/input/lm832x.c
+++ b/hw/input/lm832x.c
@@ -29,7 +29,8 @@
#define TYPE_LM8323 "lm8323"
typedef struct LM823KbdState LM823KbdState;
-#define LM8323(obj) OBJECT_CHECK(LM823KbdState, (obj), TYPE_LM8323)
+DECLARE_INSTANCE_CHECKER(LM823KbdState, LM8323,
+ TYPE_LM8323)
struct LM823KbdState {
I2CSlave parent_obj;
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 8b5ffd2..eaaf8ad 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -52,8 +52,8 @@ enum {
#define TYPE_MILKYMIST_SOFTUSB "milkymist-softusb"
typedef struct MilkymistSoftUsbState MilkymistSoftUsbState;
-#define MILKYMIST_SOFTUSB(obj) \
- OBJECT_CHECK(MilkymistSoftUsbState, (obj), TYPE_MILKYMIST_SOFTUSB)
+DECLARE_INSTANCE_CHECKER(MilkymistSoftUsbState, MILKYMIST_SOFTUSB,
+ TYPE_MILKYMIST_SOFTUSB)
struct MilkymistSoftUsbState {
SysBusDevice parent_obj;
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 8eb6866..7c53ae9 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -18,7 +18,8 @@
#define TYPE_PL050 "pl050"
typedef struct PL050State PL050State;
-#define PL050(obj) OBJECT_CHECK(PL050State, (obj), TYPE_PL050)
+DECLARE_INSTANCE_CHECKER(PL050State, PL050,
+ TYPE_PL050)
struct PL050State {
SysBusDevice parent_obj;