RE: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
> -Original Message- > From: Eduardo Habkost > Sent: 16 September 2020 19:25 > To: qemu-de...@nongnu.org > Cc: Paolo Bonzini ; Daniel P. Berrange > ; Marc-André Lureau > ; Gerd Hoffmann ; Michael S. > Tsirkin ; > Peter Maydell ; Corey Minyard > ; Cédric Le Goater > ; David Gibson ; Cornelia Huck > ; Thomas > Huth ; Halil Pasic ; Christian > Borntraeger > ; Philippe Mathieu-Daudé ; Alistair > Francis > ; David Hildenbrand ; Laurent > Vivier ; > Amit Shah ; Stefano Stabellini ; > Anthony Perard > ; Paul Durrant ; Fam Zheng > ; Gonglei (Arei) > ; Igor Mammedov ; Stefan Berger > ; > Richard Henderson ; Michael Rolnik ; > Sarah Harris > ; Edgar E. Iglesias ; > Michael Walle > ; Aleksandar Markovic ; > Aurelien Jarno > ; Jiaxun Yang ; Aleksandar > Rikalo > ; Anthony Green ; Chris > Wulff ; > Marek Vasut ; Stafford Horne ; Palmer > Dabbelt ; > Sagar Karandikar ; Bastian Koppelmann > ; > Yoshinori Sato ; Mark Cave-Ayland > ; Artyom > Tarasenko ; Guan Xuetao ; Max > Filippov ; > qemu-...@nongnu.org; qemu-...@nongnu.org; qemu-s3...@nongnu.org; > qemu-block@nongnu.org; xen- > de...@lists.xenproject.org; qemu-ri...@nongnu.org > Subject: [PATCH 3/5] 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 Acked-by: Paul Durrant
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
On Wed, 16 Sep 2020 14:25:17 -0400 Eduardo Habkost wrote: > 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 Acked-by: Cornelia Huck
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
On 9/16/20 8:25 PM, Eduardo Habkost wrote: > 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 For the ppc part, Reviewed-by: Cédric Le Goater > --- > Cc: "Marc-André Lureau" > Cc: Gerd Hoffmann > Cc: "Michael S. Tsirkin" > Cc: "Daniel P. Berrangé" > Cc: Peter Maydell > Cc: Corey Minyard > Cc: "Cédric Le Goater" > Cc: David Gibson > Cc: Cornelia Huck > Cc: Thomas Huth > Cc: Halil Pasic > Cc: Christian Borntraeger > Cc: "Philippe Mathieu-Daudé" > Cc: Alistair Francis > Cc: David Hildenbrand > Cc: Laurent Vivier > Cc: Amit Shah > Cc: Stefano Stabellini > Cc: Anthony Perard > Cc: Paul Durrant > Cc: Paolo Bonzini > Cc: Eduardo Habkost > Cc: Fam Zheng > Cc: "Gonglei (Arei)" > Cc: Igor Mammedov > Cc: Stefan Berger > Cc: Richard Henderson > Cc: Michael Rolnik > Cc: Sarah Harris > Cc: "Edgar E. Iglesias" > Cc: Michael Walle > Cc: Aleksandar Markovic > Cc: Aurelien Jarno > Cc: Jiaxun Yang > Cc: Aleksandar Rikalo > Cc: Anthony Green > Cc: Chris Wulff > Cc: Marek Vasut > Cc: Stafford Horne > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: Yoshinori Sato > Cc: Mark Cave-Ayland > Cc: Artyom Tarasenko > Cc: Guan Xuetao > Cc: Max Filippov > Cc: qemu-de...@nongnu.org > Cc: qemu-...@nongnu.org > Cc: qemu-...@nongnu.org > Cc: qemu-s3...@nongnu.org > Cc: qemu-block@nongnu.org > Cc: xen-de...@lists.xenproject.org > Cc: qemu-ri...@nongnu.org > --- > hw/audio/intel-hda.h| 2 +- > hw/display/virtio-vga.h | 2 +- > include/authz/base.h| 2 +- > include/authz/list.h| 2 +- > include/authz/listfile.h| 2 +- > include/authz/pamacct.h | 2 +- > include/authz/simple.h | 2 +- > include/crypto/secret_common.h | 2 +- > include/crypto/secret_keyring.h | 2 +- > include/hw/arm/armsse.h | 2 +- > include/hw/hyperv/vmbus.h | 2 +- > include/hw/i2c/i2c.h| 2 +- > include/hw/i2c/smbus_slave.h| 2 +- > include/hw/ipack/ipack.h| 2 +- > include/hw/ipmi/ipmi.h | 2 +- > include/hw/mem/pc-dimm.h| 2 +- > include/hw/ppc/pnv.h| 2 +- > include/hw/ppc/pnv_core.h | 2 +- > include/hw/ppc/pnv_homer.h | 2 +- > include/hw/ppc/pnv_occ.h| 2 +- > include/hw/ppc/pnv_psi.h| 2 +- > include/hw/ppc/pnv_xive.h | 2 +- > include/hw/ppc/spapr_cpu_core.h | 2 +- > include/hw/ppc/spapr_vio.h | 2 +- > include/hw/ppc/xics.h | 2 +- > include/hw/ppc/xive.h | 2 +- > include/hw/s390x/event-facility.h | 2 +- > include/hw/s390x/s390_flic.h| 2 +- > include/hw/s390x/sclp.h | 2 +- > include/hw/sd/sd.h | 2 +- > include/hw/ssi/ssi.h| 2 +- > include/hw/sysbus.h | 2 +- > include/hw/virtio/virtio-gpu.h | 2 +- > include/hw/virtio/virtio-input.h| 2 +- > include/hw/virtio/virtio-mem.h | 2 +- > include/hw/virtio/virtio-pmem.h | 2 +- > include/hw/virtio/virtio-serial.h | 2 +- > include/hw/xen/xen-bus.h| 2 +- > include/io/channel.h| 2 +- > include/io/dns-resolver.h | 2 +- > include/io/net-listener.h | 2 +- > include/qom/object.h| 6 ++ > include/scsi/pr-manager.h | 2 +- > include/sysemu/cryptodev.h | 2 +- > include/sysemu/hostmem.h| 2 +- > include/sysemu/rng.h| 2 +- > include/sysemu/tpm_backend.h| 2 +- > include/sysemu/vhost-user-backend.h | 2 +- > target/alpha/cpu-qom.h | 2 +- > target/arm/cpu-qom.h| 2 +- > target/avr/cpu-qom.h| 2 +- > target/cris/cpu-qom.h | 2 +- > target/hppa/cpu-qom.h | 2 +- > target/i386/cpu-qom.h | 2 +- > target/lm32/cpu-qom.h | 2 +- > target/m68k/cpu-qom.h | 2 +- > target/microblaze/cpu-qom.h | 2 +- > target/mips/cpu-qom.h | 2 +- > target/moxie/cpu.h | 2 +- > target/nios2/cpu.h | 2 +- >
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
On Wed, 16 Sep 2020 14:25:17 -0400 Eduardo Habkost wrote: > 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 for x86/virtio/hostmem/QOM Acked-by: Igor Mammedov > --- > Cc: "Marc-André Lureau" > Cc: Gerd Hoffmann > Cc: "Michael S. Tsirkin" > Cc: "Daniel P. Berrangé" > Cc: Peter Maydell > Cc: Corey Minyard > Cc: "Cédric Le Goater" > Cc: David Gibson > Cc: Cornelia Huck > Cc: Thomas Huth > Cc: Halil Pasic > Cc: Christian Borntraeger > Cc: "Philippe Mathieu-Daudé" > Cc: Alistair Francis > Cc: David Hildenbrand > Cc: Laurent Vivier > Cc: Amit Shah > Cc: Stefano Stabellini > Cc: Anthony Perard > Cc: Paul Durrant > Cc: Paolo Bonzini > Cc: Eduardo Habkost > Cc: Fam Zheng > Cc: "Gonglei (Arei)" > Cc: Igor Mammedov > Cc: Stefan Berger > Cc: Richard Henderson > Cc: Michael Rolnik > Cc: Sarah Harris > Cc: "Edgar E. Iglesias" > Cc: Michael Walle > Cc: Aleksandar Markovic > Cc: Aurelien Jarno > Cc: Jiaxun Yang > Cc: Aleksandar Rikalo > Cc: Anthony Green > Cc: Chris Wulff > Cc: Marek Vasut > Cc: Stafford Horne > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: Yoshinori Sato > Cc: Mark Cave-Ayland > Cc: Artyom Tarasenko > Cc: Guan Xuetao > Cc: Max Filippov > Cc: qemu-de...@nongnu.org > Cc: qemu-...@nongnu.org > Cc: qemu-...@nongnu.org > Cc: qemu-s3...@nongnu.org > Cc: qemu-block@nongnu.org > Cc: xen-de...@lists.xenproject.org > Cc: qemu-ri...@nongnu.org > --- > hw/audio/intel-hda.h| 2 +- > hw/display/virtio-vga.h | 2 +- > include/authz/base.h| 2 +- > include/authz/list.h| 2 +- > include/authz/listfile.h| 2 +- > include/authz/pamacct.h | 2 +- > include/authz/simple.h | 2 +- > include/crypto/secret_common.h | 2 +- > include/crypto/secret_keyring.h | 2 +- > include/hw/arm/armsse.h | 2 +- > include/hw/hyperv/vmbus.h | 2 +- > include/hw/i2c/i2c.h| 2 +- > include/hw/i2c/smbus_slave.h| 2 +- > include/hw/ipack/ipack.h| 2 +- > include/hw/ipmi/ipmi.h | 2 +- > include/hw/mem/pc-dimm.h| 2 +- > include/hw/ppc/pnv.h| 2 +- > include/hw/ppc/pnv_core.h | 2 +- > include/hw/ppc/pnv_homer.h | 2 +- > include/hw/ppc/pnv_occ.h| 2 +- > include/hw/ppc/pnv_psi.h| 2 +- > include/hw/ppc/pnv_xive.h | 2 +- > include/hw/ppc/spapr_cpu_core.h | 2 +- > include/hw/ppc/spapr_vio.h | 2 +- > include/hw/ppc/xics.h | 2 +- > include/hw/ppc/xive.h | 2 +- > include/hw/s390x/event-facility.h | 2 +- > include/hw/s390x/s390_flic.h| 2 +- > include/hw/s390x/sclp.h | 2 +- > include/hw/sd/sd.h | 2 +- > include/hw/ssi/ssi.h| 2 +- > include/hw/sysbus.h | 2 +- > include/hw/virtio/virtio-gpu.h | 2 +- > include/hw/virtio/virtio-input.h| 2 +- > include/hw/virtio/virtio-mem.h | 2 +- > include/hw/virtio/virtio-pmem.h | 2 +- > include/hw/virtio/virtio-serial.h | 2 +- > include/hw/xen/xen-bus.h| 2 +- > include/io/channel.h| 2 +- > include/io/dns-resolver.h | 2 +- > include/io/net-listener.h | 2 +- > include/qom/object.h| 6 ++ > include/scsi/pr-manager.h | 2 +- > include/sysemu/cryptodev.h | 2 +- > include/sysemu/hostmem.h| 2 +- > include/sysemu/rng.h| 2 +- > include/sysemu/tpm_backend.h| 2 +- > include/sysemu/vhost-user-backend.h | 2 +- > target/alpha/cpu-qom.h | 2 +- > target/arm/cpu-qom.h| 2 +- > target/avr/cpu-qom.h| 2 +- > target/cris/cpu-qom.h | 2 +- > target/hppa/cpu-qom.h | 2 +- > target/i386/cpu-qom.h | 2 +- > target/lm32/cpu-qom.h | 2 +- > target/m68k/cpu-qom.h | 2 +- > target/microblaze/cpu-qom.h | 2 +- > target/mips/cpu-qom.h | 2 +- > target/moxie/cpu.h | 2 +- > target/nios2/cpu.h | 2 +- >
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
On 16/09/2020 20.25, Eduardo Habkost wrote: > 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 > --- Acked-by: Thomas Huth
[PATCH 3/5] 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 --- Cc: "Marc-André Lureau" Cc: Gerd Hoffmann Cc: "Michael S. Tsirkin" Cc: "Daniel P. Berrangé" Cc: Peter Maydell Cc: Corey Minyard Cc: "Cédric Le Goater" Cc: David Gibson Cc: Cornelia Huck Cc: Thomas Huth Cc: Halil Pasic Cc: Christian Borntraeger Cc: "Philippe Mathieu-Daudé" Cc: Alistair Francis Cc: David Hildenbrand Cc: Laurent Vivier Cc: Amit Shah Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Fam Zheng Cc: "Gonglei (Arei)" Cc: Igor Mammedov Cc: Stefan Berger Cc: Richard Henderson Cc: Michael Rolnik Cc: Sarah Harris Cc: "Edgar E. Iglesias" Cc: Michael Walle Cc: Aleksandar Markovic Cc: Aurelien Jarno Cc: Jiaxun Yang Cc: Aleksandar Rikalo Cc: Anthony Green Cc: Chris Wulff Cc: Marek Vasut Cc: Stafford Horne Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Yoshinori Sato Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Cc: Guan Xuetao Cc: Max Filippov Cc: qemu-de...@nongnu.org Cc: qemu-...@nongnu.org Cc: qemu-...@nongnu.org Cc: qemu-s3...@nongnu.org Cc: qemu-block@nongnu.org Cc: xen-de...@lists.xenproject.org Cc: qemu-ri...@nongnu.org --- hw/audio/intel-hda.h| 2 +- hw/display/virtio-vga.h | 2 +- include/authz/base.h| 2 +- include/authz/list.h| 2 +- include/authz/listfile.h| 2 +- include/authz/pamacct.h | 2 +- include/authz/simple.h | 2 +- include/crypto/secret_common.h | 2 +- include/crypto/secret_keyring.h | 2 +- include/hw/arm/armsse.h | 2 +- include/hw/hyperv/vmbus.h | 2 +- include/hw/i2c/i2c.h| 2 +- include/hw/i2c/smbus_slave.h| 2 +- include/hw/ipack/ipack.h| 2 +- include/hw/ipmi/ipmi.h | 2 +- include/hw/mem/pc-dimm.h| 2 +- include/hw/ppc/pnv.h| 2 +- include/hw/ppc/pnv_core.h | 2 +- include/hw/ppc/pnv_homer.h | 2 +- include/hw/ppc/pnv_occ.h| 2 +- include/hw/ppc/pnv_psi.h| 2 +- include/hw/ppc/pnv_xive.h | 2 +- include/hw/ppc/spapr_cpu_core.h | 2 +- include/hw/ppc/spapr_vio.h | 2 +- include/hw/ppc/xics.h | 2 +- include/hw/ppc/xive.h | 2 +- include/hw/s390x/event-facility.h | 2 +- include/hw/s390x/s390_flic.h| 2 +- include/hw/s390x/sclp.h | 2 +- include/hw/sd/sd.h | 2 +- include/hw/ssi/ssi.h| 2 +- include/hw/sysbus.h | 2 +- include/hw/virtio/virtio-gpu.h | 2 +- include/hw/virtio/virtio-input.h| 2 +- include/hw/virtio/virtio-mem.h | 2 +- include/hw/virtio/virtio-pmem.h | 2 +- include/hw/virtio/virtio-serial.h | 2 +- include/hw/xen/xen-bus.h| 2 +- include/io/channel.h| 2 +- include/io/dns-resolver.h | 2 +- include/io/net-listener.h | 2 +- include/qom/object.h| 6 ++ include/scsi/pr-manager.h | 2 +- include/sysemu/cryptodev.h | 2 +- include/sysemu/hostmem.h| 2 +- include/sysemu/rng.h| 2 +- include/sysemu/tpm_backend.h| 2 +- include/sysemu/vhost-user-backend.h | 2 +- target/alpha/cpu-qom.h | 2 +- target/arm/cpu-qom.h| 2 +- target/avr/cpu-qom.h| 2 +- target/cris/cpu-qom.h | 2 +- target/hppa/cpu-qom.h | 2 +- target/i386/cpu-qom.h | 2 +- target/lm32/cpu-qom.h | 2 +- target/m68k/cpu-qom.h | 2 +- target/microblaze/cpu-qom.h | 2 +- target/mips/cpu-qom.h | 2 +- target/moxie/cpu.h | 2 +- target/nios2/cpu.h | 2 +- target/openrisc/cpu.h | 2 +- target/ppc/cpu-qom.h| 2 +- target/riscv/cpu.h | 2 +- target/rx/cpu-qom.h | 2 +- target/s390x/cpu-qom.h | 2 +- target/sh4/cpu-qom.h| 2 +- target/sparc/cpu-qom.h | 2 +- target/tilegx/cpu.h | 2 +- target/tricore/cpu-qom.h| 2 +-