diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:17 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 30b5707c269cac1ad80b72f777e52c8e08b2ff19 (patch) | |
tree | 7201b93d5b438b3a608040e71b10ffec73f9c980 /hw | |
parent | c734cd40a10943753a4d015c9d0a6c08c8f0159e (diff) |
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
One of the goals of having less boilerplate on QOM declarations
is to avoid human error. Requiring an extra argument that is
never used is an opportunity for mistakes.
Remove the unused argument from OBJECT_DECLARE_TYPE and
OBJECT_DECLARE_SIMPLE_TYPE.
Coccinelle patch used to convert all users of the macros:
@@
declarer name OBJECT_DECLARE_TYPE;
identifier InstanceType, ClassType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_TYPE(InstanceType, ClassType,
- lowercase,
UPPERCASE);
@@
declarer name OBJECT_DECLARE_SIMPLE_TYPE;
identifier InstanceType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_SIMPLE_TYPE(InstanceType,
- lowercase,
UPPERCASE);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200916182519.415636-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/audio/intel-hda.h | 2 | ||||
-rw-r--r-- | hw/display/virtio-vga.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/audio/intel-hda.h b/hw/audio/intel-hda.h index f5cce18fa3..e2372abbdc 100644 --- a/hw/audio/intel-hda.h +++ b/hw/audio/intel-hda.h @@ -9,7 +9,7 @@ #define TYPE_HDA_CODEC_DEVICE "hda-codec" OBJECT_DECLARE_TYPE(HDACodecDevice, HDACodecDeviceClass, - hda_codec_device, 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 5c5671c9c1..977ad5edc2 100644 --- a/hw/display/virtio-vga.h +++ b/hw/display/virtio-vga.h @@ -10,7 +10,7 @@ */ #define TYPE_VIRTIO_VGA_BASE "virtio-vga-base" OBJECT_DECLARE_TYPE(VirtIOVGABase, VirtIOVGABaseClass, - virtio_vga_base, VIRTIO_VGA_BASE) + VIRTIO_VGA_BASE) struct VirtIOVGABase { VirtIOPCIProxy parent_obj; |