mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
c734cd40a1
commit
30b5707c26
74 changed files with 75 additions and 77 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
#define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base"
|
||||
OBJECT_DECLARE_TYPE(VirtIOGPUBase, VirtIOGPUBaseClass,
|
||||
virtio_gpu_base, VIRTIO_GPU_BASE)
|
||||
VIRTIO_GPU_BASE)
|
||||
|
||||
#define TYPE_VIRTIO_GPU "virtio-gpu-device"
|
||||
typedef struct VirtIOGPU VirtIOGPU;
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct virtio_input_event virtio_input_event;
|
|||
|
||||
#define TYPE_VIRTIO_INPUT "virtio-input-device"
|
||||
OBJECT_DECLARE_TYPE(VirtIOInput, VirtIOInputClass,
|
||||
virtio_input, VIRTIO_INPUT)
|
||||
VIRTIO_INPUT)
|
||||
#define VIRTIO_INPUT_GET_PARENT_CLASS(obj) \
|
||||
OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define TYPE_VIRTIO_MEM "virtio-mem"
|
||||
|
||||
OBJECT_DECLARE_TYPE(VirtIOMEM, VirtIOMEMClass,
|
||||
virtio_mem, VIRTIO_MEM)
|
||||
VIRTIO_MEM)
|
||||
|
||||
#define VIRTIO_MEM_MEMDEV_PROP "memdev"
|
||||
#define VIRTIO_MEM_NODE_PROP "node"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define TYPE_VIRTIO_PMEM "virtio-pmem"
|
||||
|
||||
OBJECT_DECLARE_TYPE(VirtIOPMEM, VirtIOPMEMClass,
|
||||
virtio_pmem, VIRTIO_PMEM)
|
||||
VIRTIO_PMEM)
|
||||
|
||||
#define VIRTIO_PMEM_ADDR_PROP "memaddr"
|
||||
#define VIRTIO_PMEM_MEMDEV_PROP "memdev"
|
||||
|
|
|
@ -27,7 +27,7 @@ struct virtio_serial_conf {
|
|||
|
||||
#define TYPE_VIRTIO_SERIAL_PORT "virtio-serial-port"
|
||||
OBJECT_DECLARE_TYPE(VirtIOSerialPort, VirtIOSerialPortClass,
|
||||
virtio_serial_port, VIRTIO_SERIAL_PORT)
|
||||
VIRTIO_SERIAL_PORT)
|
||||
|
||||
typedef struct VirtIOSerial VirtIOSerial;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue