diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-31 17:07:33 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-09 09:27:09 -0400 |
commit | 8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch) | |
tree | 6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /hw/ide | |
parent | db1015e92e04835c9eb50c29625fe566d1202dbd (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/ide')
-rw-r--r-- | hw/ide/isa.c | 3 | ||||
-rw-r--r-- | hw/ide/microdrive.c | 3 | ||||
-rw-r--r-- | hw/ide/mmio.c | 3 | ||||
-rw-r--r-- | hw/ide/sii3112.c | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 438f74e67c..9a3489691b 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -39,7 +39,8 @@ #define TYPE_ISA_IDE "isa-ide" typedef struct ISAIDEState ISAIDEState; -#define ISA_IDE(obj) OBJECT_CHECK(ISAIDEState, (obj), TYPE_ISA_IDE) +DECLARE_INSTANCE_CHECKER(ISAIDEState, ISA_IDE, + TYPE_ISA_IDE) struct ISAIDEState { ISADevice parent_obj; diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 28f171bf15..6e7f5df901 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -35,7 +35,8 @@ #define TYPE_MICRODRIVE "microdrive" typedef struct MicroDriveState MicroDriveState; -#define MICRODRIVE(obj) OBJECT_CHECK(MicroDriveState, (obj), TYPE_MICRODRIVE) +DECLARE_INSTANCE_CHECKER(MicroDriveState, MICRODRIVE, + TYPE_MICRODRIVE) /***********************************************************/ /* CF-ATA Microdrive */ diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 501afdfaaa..4bf6e3a8b7 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -41,7 +41,8 @@ #define TYPE_MMIO_IDE "mmio-ide" typedef struct MMIOIDEState MMIOState; -#define MMIO_IDE(obj) OBJECT_CHECK(MMIOState, (obj), TYPE_MMIO_IDE) +DECLARE_INSTANCE_CHECKER(MMIOState, MMIO_IDE, + TYPE_MMIO_IDE) struct MMIOIDEState { /*< private >*/ diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 11c5b88bbf..968c239ab8 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -20,7 +20,7 @@ #define TYPE_SII3112_PCI "sii3112" typedef struct SiI3112PCIState SiI3112PCIState; -#define SII3112_PCI(obj) OBJECT_CHECK(SiI3112PCIState, (obj), \ +DECLARE_INSTANCE_CHECKER(SiI3112PCIState, SII3112_PCI, TYPE_SII3112_PCI) typedef struct SiI3112Regs { |