From c821774a3b7ca991d684c3966171d8657f842aea Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 31 Aug 2020 17:07:37 -0400 Subject: Use OBJECT_DECLARE_TYPE where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Message-Id: <20200831210740.126168-16-ehabkost@redhat.com> Message-Id: <20200831210740.126168-17-ehabkost@redhat.com> Message-Id: <20200831210740.126168-18-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- hw/audio/intel-hda.h | 6 ++---- hw/display/virtio-vga.h | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'hw') diff --git a/hw/audio/intel-hda.h b/hw/audio/intel-hda.h index 813a7a3..f5cce18 100644 --- a/hw/audio/intel-hda.h +++ b/hw/audio/intel-hda.h @@ -8,10 +8,8 @@ /* hda bus */ #define TYPE_HDA_CODEC_DEVICE "hda-codec" -typedef struct HDACodecDevice HDACodecDevice; -typedef struct HDACodecDeviceClass HDACodecDeviceClass; -DECLARE_OBJ_CHECKERS(HDACodecDevice, HDACodecDeviceClass, - HDA_CODEC_DEVICE, TYPE_HDA_CODEC_DEVICE) +OBJECT_DECLARE_TYPE(HDACodecDevice, HDACodecDeviceClass, + hda_codec_device, HDA_CODEC_DEVICE) #define TYPE_HDA_BUS "HDA" typedef struct HDACodecBus HDACodecBus; diff --git a/hw/display/virtio-vga.h b/hw/display/virtio-vga.h index 19f8af7..5c5671c 100644 --- a/hw/display/virtio-vga.h +++ b/hw/display/virtio-vga.h @@ -9,10 +9,8 @@ * virtio-vga-base: This extends VirtioPCIProxy. */ #define TYPE_VIRTIO_VGA_BASE "virtio-vga-base" -typedef struct VirtIOVGABase VirtIOVGABase; -typedef struct VirtIOVGABaseClass VirtIOVGABaseClass; -DECLARE_OBJ_CHECKERS(VirtIOVGABase, VirtIOVGABaseClass, - VIRTIO_VGA_BASE, TYPE_VIRTIO_VGA_BASE) +OBJECT_DECLARE_TYPE(VirtIOVGABase, VirtIOVGABaseClass, + virtio_vga_base, VIRTIO_VGA_BASE) struct VirtIOVGABase { VirtIOPCIProxy parent_obj; -- cgit v1.1