qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
commit30b5707c269cac1ad80b72f777e52c8e08b2ff19
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 16 Sep 2020 18:25:17 +0000 (16 14:25 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 18 Sep 2020 18:12:32 +0000 (18 14:12 -0400)
tree7201b93d5b438b3a608040e71b10ffec73f9c980
parentc734cd40a10943753a4d015c9d0a6c08c8f0159e
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>
74 files changed:
backends/dbus-vmstate.c
hw/audio/intel-hda.h
hw/display/virtio-vga.h
include/authz/base.h
include/authz/list.h
include/authz/listfile.h
include/authz/pamacct.h
include/authz/simple.h
include/crypto/secret_common.h
include/crypto/secret_keyring.h
include/hw/arm/armsse.h
include/hw/hyperv/vmbus.h
include/hw/i2c/i2c.h
include/hw/i2c/smbus_slave.h
include/hw/ipack/ipack.h
include/hw/ipmi/ipmi.h
include/hw/mem/pc-dimm.h
include/hw/ppc/pnv.h
include/hw/ppc/pnv_core.h
include/hw/ppc/pnv_homer.h
include/hw/ppc/pnv_occ.h
include/hw/ppc/pnv_psi.h
include/hw/ppc/pnv_xive.h
include/hw/ppc/spapr_cpu_core.h
include/hw/ppc/spapr_vio.h
include/hw/ppc/xics.h
include/hw/ppc/xive.h
include/hw/s390x/event-facility.h
include/hw/s390x/s390_flic.h
include/hw/s390x/sclp.h
include/hw/sd/sd.h
include/hw/ssi/ssi.h
include/hw/sysbus.h
include/hw/virtio/virtio-gpu.h
include/hw/virtio/virtio-input.h
include/hw/virtio/virtio-mem.h
include/hw/virtio/virtio-pmem.h
include/hw/virtio/virtio-serial.h
include/hw/xen/xen-bus.h
include/io/channel.h
include/io/dns-resolver.h
include/io/net-listener.h
include/qom/object.h
include/scsi/pr-manager.h
include/sysemu/cryptodev.h
include/sysemu/hostmem.h
include/sysemu/rng.h
include/sysemu/tpm_backend.h
include/sysemu/vhost-user-backend.h
target/alpha/cpu-qom.h
target/arm/cpu-qom.h
target/avr/cpu-qom.h
target/cris/cpu-qom.h
target/hppa/cpu-qom.h
target/i386/cpu-qom.h
target/lm32/cpu-qom.h
target/m68k/cpu-qom.h
target/microblaze/cpu-qom.h
target/mips/cpu-qom.h
target/moxie/cpu.h
target/nios2/cpu.h
target/openrisc/cpu.h
target/ppc/cpu-qom.h
target/riscv/cpu.h
target/rx/cpu-qom.h
target/s390x/cpu-qom.h
target/sh4/cpu-qom.h
target/sparc/cpu-qom.h
target/tilegx/cpu.h
target/tricore/cpu-qom.h
target/unicore32/cpu-qom.h
target/xtensa/cpu-qom.h
ui/input-barrier.c
ui/input-linux.c