aboutsummaryrefslogtreecommitdiff
path: root/include/hw/core
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/core
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 'include/hw/core')
-rw-r--r--include/hw/core/cpu.h4
-rw-r--r--include/hw/core/generic-loader.h4
-rw-r--r--include/hw/core/split-irq.h3
3 files changed, 6 insertions, 5 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index b22bb54c82..99dc33ffeb 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -63,8 +63,8 @@ typedef uint64_t vaddr;
#define CPU(obj) ((CPUState *)(obj))
typedef struct CPUClass CPUClass;
-#define CPU_CLASS(class) OBJECT_CLASS_CHECK(CPUClass, (class), TYPE_CPU)
-#define CPU_GET_CLASS(obj) OBJECT_GET_CLASS(CPUClass, (obj), TYPE_CPU)
+DECLARE_CLASS_CHECKERS(CPUClass, CPU,
+ TYPE_CPU)
typedef enum MMUAccessType {
MMU_DATA_LOAD = 0,
diff --git a/include/hw/core/generic-loader.h b/include/hw/core/generic-loader.h
index f435af1884..8e86532df6 100644
--- a/include/hw/core/generic-loader.h
+++ b/include/hw/core/generic-loader.h
@@ -43,7 +43,7 @@ struct GenericLoaderState {
typedef struct GenericLoaderState GenericLoaderState;
#define TYPE_GENERIC_LOADER "loader"
-#define GENERIC_LOADER(obj) OBJECT_CHECK(GenericLoaderState, (obj), \
- TYPE_GENERIC_LOADER)
+DECLARE_INSTANCE_CHECKER(GenericLoaderState, GENERIC_LOADER,
+ TYPE_GENERIC_LOADER)
#endif
diff --git a/include/hw/core/split-irq.h b/include/hw/core/split-irq.h
index 872a39aa4f..76d42b29aa 100644
--- a/include/hw/core/split-irq.h
+++ b/include/hw/core/split-irq.h
@@ -44,7 +44,8 @@
typedef struct SplitIRQ SplitIRQ;
-#define SPLIT_IRQ(obj) OBJECT_CHECK(SplitIRQ, (obj), TYPE_SPLIT_IRQ)
+DECLARE_INSTANCE_CHECKER(SplitIRQ, SPLIT_IRQ,
+ TYPE_SPLIT_IRQ)
struct SplitIRQ {
DeviceState parent_obj;