aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
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/i386
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
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/i386')
-rw-r--r--hw/i386/amd_iommu.h4
-rw-r--r--hw/i386/kvm/clock.c3
-rw-r--r--hw/i386/kvm/i8254.c7
-rw-r--r--hw/i386/kvm/i8259.c6
-rw-r--r--hw/i386/kvmvapic.c3
-rw-r--r--hw/i386/port92.c3
-rw-r--r--hw/i386/vmmouse.c3
-rw-r--r--hw/i386/vmport.c3
-rw-r--r--hw/i386/xen/xen_platform.c4
-rw-r--r--hw/i386/xen/xen_pvdevice.c4
10 files changed, 20 insertions, 20 deletions
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index 85860c36dd..fa5feb183c 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -298,8 +298,8 @@ struct irte_ga {
#define TYPE_AMD_IOMMU_DEVICE "amd-iommu"
typedef struct AMDVIState AMDVIState;
-#define AMD_IOMMU_DEVICE(obj)\
- OBJECT_CHECK(AMDVIState, (obj), TYPE_AMD_IOMMU_DEVICE)
+DECLARE_INSTANCE_CHECKER(AMDVIState, AMD_IOMMU_DEVICE,
+ TYPE_AMD_IOMMU_DEVICE)
#define TYPE_AMD_IOMMU_PCI "AMDVI-PCI"
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 94ece445af..37f47540e5 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -33,7 +33,8 @@
#define TYPE_KVM_CLOCK "kvmclock"
typedef struct KVMClockState KVMClockState;
-#define KVM_CLOCK(obj) OBJECT_CHECK(KVMClockState, (obj), TYPE_KVM_CLOCK)
+DECLARE_INSTANCE_CHECKER(KVMClockState, KVM_CLOCK,
+ TYPE_KVM_CLOCK)
struct KVMClockState {
/*< private >*/
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index d3e4142b16..e18fd337fa 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -41,11 +41,8 @@
typedef struct KVMPITClass KVMPITClass;
typedef struct KVMPITState KVMPITState;
-#define KVM_PIT(obj) OBJECT_CHECK(KVMPITState, (obj), TYPE_KVM_I8254)
-#define KVM_PIT_CLASS(class) \
- OBJECT_CLASS_CHECK(KVMPITClass, (class), TYPE_KVM_I8254)
-#define KVM_PIT_GET_CLASS(obj) \
- OBJECT_GET_CLASS(KVMPITClass, (obj), TYPE_KVM_I8254)
+DECLARE_OBJ_CHECKERS(KVMPITState, KVMPITClass,
+ KVM_PIT, TYPE_KVM_I8254)
struct KVMPITState {
PITCommonState parent_obj;
diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
index b256f97c83..3f8bf69e9c 100644
--- a/hw/i386/kvm/i8259.c
+++ b/hw/i386/kvm/i8259.c
@@ -21,10 +21,8 @@
#define TYPE_KVM_I8259 "kvm-i8259"
typedef struct KVMPICClass KVMPICClass;
-#define KVM_PIC_CLASS(class) \
- OBJECT_CLASS_CHECK(KVMPICClass, (class), TYPE_KVM_I8259)
-#define KVM_PIC_GET_CLASS(obj) \
- OBJECT_GET_CLASS(KVMPICClass, (obj), TYPE_KVM_I8259)
+DECLARE_CLASS_CHECKERS(KVMPICClass, KVM_PIC,
+ TYPE_KVM_I8259)
/**
* KVMPICClass:
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 857d9f4a61..a4e05f086e 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -74,7 +74,8 @@ struct VAPICROMState {
typedef struct VAPICROMState VAPICROMState;
#define TYPE_VAPIC "kvmvapic"
-#define VAPIC(obj) OBJECT_CHECK(VAPICROMState, (obj), TYPE_VAPIC)
+DECLARE_INSTANCE_CHECKER(VAPICROMState, VAPIC,
+ TYPE_VAPIC)
#define TPR_INSTR_ABS_MODRM 0x1
#define TPR_INSTR_MATCH_MODRM_REG 0x2
diff --git a/hw/i386/port92.c b/hw/i386/port92.c
index 48200def5d..c00dcb261b 100644
--- a/hw/i386/port92.c
+++ b/hw/i386/port92.c
@@ -15,7 +15,8 @@
#include "qom/object.h"
typedef struct Port92State Port92State;
-#define PORT92(obj) OBJECT_CHECK(Port92State, (obj), TYPE_PORT92)
+DECLARE_INSTANCE_CHECKER(Port92State, PORT92,
+ TYPE_PORT92)
struct Port92State {
ISADevice parent_obj;
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index d187de3745..ae4cbc7add 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -52,7 +52,8 @@
#define TYPE_VMMOUSE "vmmouse"
typedef struct VMMouseState VMMouseState;
-#define VMMOUSE(obj) OBJECT_CHECK(VMMouseState, (obj), TYPE_VMMOUSE)
+DECLARE_INSTANCE_CHECKER(VMMouseState, VMMOUSE,
+ TYPE_VMMOUSE)
struct VMMouseState {
ISADevice parent_obj;
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 3720834630..df52b6f903 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -64,7 +64,8 @@
#define VCPU_INFO_RESERVED_BIT 31
typedef struct VMPortState VMPortState;
-#define VMPORT(obj) OBJECT_CHECK(VMPortState, (obj), TYPE_VMPORT)
+DECLARE_INSTANCE_CHECKER(VMPortState, VMPORT,
+ TYPE_VMPORT)
struct VMPortState {
ISADevice parent_obj;
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index e8dbd580c5..a8bbe8c833 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -72,8 +72,8 @@ struct PCIXenPlatformState {
typedef struct PCIXenPlatformState PCIXenPlatformState;
#define TYPE_XEN_PLATFORM "xen-platform"
-#define XEN_PLATFORM(obj) \
- OBJECT_CHECK(PCIXenPlatformState, (obj), TYPE_XEN_PLATFORM)
+DECLARE_INSTANCE_CHECKER(PCIXenPlatformState, XEN_PLATFORM,
+ TYPE_XEN_PLATFORM)
#define XEN_PLATFORM_IOPORT 0x10
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index 518c66d0bf..67f83616d3 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -41,8 +41,8 @@
#define TYPE_XEN_PV_DEVICE "xen-pvdevice"
typedef struct XenPVDevice XenPVDevice;
-#define XEN_PV_DEVICE(obj) \
- OBJECT_CHECK(XenPVDevice, (obj), TYPE_XEN_PV_DEVICE)
+DECLARE_INSTANCE_CHECKER(XenPVDevice, XEN_PV_DEVICE,
+ TYPE_XEN_PV_DEVICE)
struct XenPVDevice {
/*< private >*/