Use OBJECT_DECLARE_TYPE where possible

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é <berrange@redhat.com>
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 <ehabkost@redhat.com>
This commit is contained in:
Eduardo Habkost 2020-08-31 17:07:37 -04:00
parent fa34a3c58a
commit c821774a3b
73 changed files with 146 additions and 292 deletions

View file

@ -25,10 +25,8 @@
#include "qom/object.h"
#define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base"
typedef struct VirtIOGPUBase VirtIOGPUBase;
typedef struct VirtIOGPUBaseClass VirtIOGPUBaseClass;
DECLARE_OBJ_CHECKERS(VirtIOGPUBase, VirtIOGPUBaseClass,
VIRTIO_GPU_BASE, TYPE_VIRTIO_GPU_BASE)
OBJECT_DECLARE_TYPE(VirtIOGPUBase, VirtIOGPUBaseClass,
virtio_gpu_base, VIRTIO_GPU_BASE)
#define TYPE_VIRTIO_GPU "virtio-gpu-device"
typedef struct VirtIOGPU VirtIOGPU;

View file

@ -19,10 +19,8 @@ typedef struct virtio_input_event virtio_input_event;
/* qemu internals */
#define TYPE_VIRTIO_INPUT "virtio-input-device"
typedef struct VirtIOInput VirtIOInput;
typedef struct VirtIOInputClass VirtIOInputClass;
DECLARE_OBJ_CHECKERS(VirtIOInput, VirtIOInputClass,
VIRTIO_INPUT, TYPE_VIRTIO_INPUT)
OBJECT_DECLARE_TYPE(VirtIOInput, VirtIOInputClass,
virtio_input, VIRTIO_INPUT)
#define VIRTIO_INPUT_GET_PARENT_CLASS(obj) \
OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT)

View file

@ -21,10 +21,8 @@
#define TYPE_VIRTIO_MEM "virtio-mem"
typedef struct VirtIOMEM VirtIOMEM;
typedef struct VirtIOMEMClass VirtIOMEMClass;
DECLARE_OBJ_CHECKERS(VirtIOMEM, VirtIOMEMClass,
VIRTIO_MEM, TYPE_VIRTIO_MEM)
OBJECT_DECLARE_TYPE(VirtIOMEM, VirtIOMEMClass,
virtio_mem, VIRTIO_MEM)
#define VIRTIO_MEM_MEMDEV_PROP "memdev"
#define VIRTIO_MEM_NODE_PROP "node"

View file

@ -20,10 +20,8 @@
#define TYPE_VIRTIO_PMEM "virtio-pmem"
typedef struct VirtIOPMEM VirtIOPMEM;
typedef struct VirtIOPMEMClass VirtIOPMEMClass;
DECLARE_OBJ_CHECKERS(VirtIOPMEM, VirtIOPMEMClass,
VIRTIO_PMEM, TYPE_VIRTIO_PMEM)
OBJECT_DECLARE_TYPE(VirtIOPMEM, VirtIOPMEMClass,
virtio_pmem, VIRTIO_PMEM)
#define VIRTIO_PMEM_ADDR_PROP "memaddr"
#define VIRTIO_PMEM_MEMDEV_PROP "memdev"

View file

@ -26,10 +26,8 @@ struct virtio_serial_conf {
};
#define TYPE_VIRTIO_SERIAL_PORT "virtio-serial-port"
typedef struct VirtIOSerialPort VirtIOSerialPort;
typedef struct VirtIOSerialPortClass VirtIOSerialPortClass;
DECLARE_OBJ_CHECKERS(VirtIOSerialPort, VirtIOSerialPortClass,
VIRTIO_SERIAL_PORT, TYPE_VIRTIO_SERIAL_PORT)
OBJECT_DECLARE_TYPE(VirtIOSerialPort, VirtIOSerialPortClass,
virtio_serial_port, VIRTIO_SERIAL_PORT)
typedef struct VirtIOSerial VirtIOSerial;