RE: [PATCH 4/5] [automated] Use OBJECT_DECLARE_TYPE when possible

2020-09-17 Thread Paul Durrant
> -Original Message-
> From: Eduardo Habkost 
> Sent: 16 September 2020 19:25
> To: qemu-de...@nongnu.org
> Cc: Paolo Bonzini ; Daniel P. Berrange 
> ; Peter Maydell
> ; Andrzej Zaborowski ; Alistair 
> Francis
> ; Kevin Wolf ; Max Reitz 
> ; Mark Cave-
> Ayland ; David Gibson 
> ; Richard Henderson
> ; David Hildenbrand ; Cornelia Huck 
> ; Thomas
> Huth ; Halil Pasic ; Christian 
> Borntraeger
> ; Michael S. Tsirkin ; Fam Zheng 
> ; Dmitry
> Fleytman ; Gerd Hoffmann ; 
> Marc-André Lureau
> ; Cédric Le Goater ; Andrew 
> Jeffery ; Joel
> Stanley ; Andrew Baumann ; 
> Philippe Mathieu-Daudé
> ; Eric Auger ; Marcel Apfelbaum 
> ;
> Laurent Vivier ; Sergio Lopez ; John Snow 
> ; Xiao
> Guangrong ; Peter Chubb 
> ; Beniamino Galvani
> ; Edgar E. Iglesias ; Stefano 
> Stabellini
> ; Anthony Perard ; Paul 
> Durrant ;
> Jason Wang ; qemu-...@nongnu.org; qemu-block@nongnu.org; 
> qemu-...@nongnu.org;
> qemu-s3...@nongnu.org; xen-de...@lists.xenproject.org
> Subject: [PATCH 4/5] [automated] Use OBJECT_DECLARE_TYPE when possible
> 
> This converts existing DECLARE_OBJ_CHECKERS usage to
> OBJECT_DECLARE_TYPE when possible.
> 
>  $ ./scripts/codeconverter/converter.py -i \
>--pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]')
> 
> Signed-off-by: Eduardo Habkost 

Acked-by: Paul Durrant 




Re: [PATCH 4/5] [automated] Use OBJECT_DECLARE_TYPE when possible

2020-09-17 Thread Cédric Le Goater
On 9/16/20 8:25 PM, Eduardo Habkost wrote:
> This converts existing DECLARE_OBJ_CHECKERS usage to
> OBJECT_DECLARE_TYPE when possible.
> 
>  $ ./scripts/codeconverter/converter.py -i \
>--pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]')
> 
> Signed-off-by: Eduardo Habkost 

For the aspeed part,

Reviewed-by: Cédric Le Goater 


> ---
> Cc: Peter Maydell 
> Cc: Andrzej Zaborowski 
> Cc: Alistair Francis 
> Cc: Kevin Wolf 
> Cc: Max Reitz 
> Cc: Mark Cave-Ayland 
> Cc: David Gibson 
> Cc: Richard Henderson 
> Cc: David Hildenbrand 
> Cc: Cornelia Huck 
> Cc: Thomas Huth 
> Cc: Halil Pasic 
> Cc: Christian Borntraeger 
> Cc: "Michael S. Tsirkin" 
> Cc: Paolo Bonzini 
> Cc: Fam Zheng 
> Cc: Dmitry Fleytman 
> Cc: Gerd Hoffmann 
> Cc: "Marc-André Lureau" 
> Cc: "Cédric Le Goater" 
> Cc: Andrew Jeffery 
> Cc: Joel Stanley 
> Cc: Andrew Baumann 
> Cc: "Philippe Mathieu-Daudé" 
> Cc: Eric Auger 
> Cc: Eduardo Habkost 
> Cc: Marcel Apfelbaum 
> Cc: Laurent Vivier 
> Cc: Sergio Lopez 
> Cc: John Snow 
> Cc: Xiao Guangrong 
> Cc: Peter Chubb 
> Cc: "Daniel P. Berrangé" 
> Cc: Beniamino Galvani 
> Cc: "Edgar E. Iglesias" 
> Cc: Stefano Stabellini 
> Cc: Anthony Perard 
> Cc: Paul Durrant 
> Cc: Jason Wang 
> Cc: qemu-...@nongnu.org
> Cc: qemu-de...@nongnu.org
> Cc: qemu-block@nongnu.org
> Cc: qemu-...@nongnu.org
> Cc: qemu-s3...@nongnu.org
> Cc: xen-de...@lists.xenproject.org
> ---
>  hw/ppc/e500.h | 5 +
>  hw/s390x/ccw-device.h | 4 +---
>  hw/s390x/virtio-ccw.h | 5 +
>  hw/usb/ccid.h | 5 +
>  hw/usb/hcd-dwc2.h | 3 +--
>  hw/usb/hcd-ehci.h | 5 +
>  hw/virtio/virtio-pci.h| 5 +
>  include/chardev/char.h| 4 +---
>  include/hw/arm/aspeed_soc.h   | 5 +
>  include/hw/arm/bcm2836.h  | 5 +
>  include/hw/arm/smmu-common.h  | 5 +
>  include/hw/arm/smmuv3.h   | 5 +
>  include/hw/arm/virt.h | 5 +
>  include/hw/boards.h   | 3 +--
>  include/hw/display/macfb.h| 5 +
>  include/hw/gpio/aspeed_gpio.h | 5 +
>  include/hw/i2c/aspeed_i2c.h   | 5 +
>  include/hw/i386/ioapic_internal.h | 5 +
>  include/hw/i386/microvm.h | 5 +
>  include/hw/i386/pc.h  | 4 +---
>  include/hw/i386/x86-iommu.h   | 5 +
>  include/hw/i386/x86.h | 5 +
>  include/hw/ide/internal.h | 4 +---
>  include/hw/input/adb.h| 4 +---
>  include/hw/isa/i8259_internal.h   | 5 +
>  include/hw/isa/isa.h  | 4 +---
>  include/hw/mem/nvdimm.h   | 5 +
>  include/hw/misc/aspeed_scu.h  | 5 +
>  include/hw/misc/aspeed_sdmc.h | 5 +
>  include/hw/misc/imx_ccm.h | 5 +
>  include/hw/misc/mos6522.h | 5 +
>  include/hw/pci-host/pnv_phb4.h| 5 +
>  include/hw/pci/pci.h  | 4 +---
>  include/hw/pci/pci_host.h | 4 +---
>  include/hw/pcmcia.h   | 5 +
>  include/hw/ppc/spapr.h| 5 +
>  include/hw/qdev-core.h| 4 +---
>  include/hw/rtc/allwinner-rtc.h| 5 +
>  include/hw/s390x/3270-ccw.h   | 5 +
>  include/hw/s390x/s390-virtio-ccw.h| 5 +
>  include/hw/s390x/storage-attributes.h | 5 +
>  include/hw/s390x/storage-keys.h   | 5 +
>  include/hw/s390x/tod.h| 5 +
>  include/hw/scsi/scsi.h| 4 +---
>  include/hw/sd/allwinner-sdhost.h  | 5 +
>  include/hw/sd/sd.h| 5 +
>  include/hw/ssi/aspeed_smc.h   | 5 +
>  include/hw/ssi/xilinx_spips.h | 4 +---
>  include/hw/timer/aspeed_timer.h   | 5 +
>  include/hw/timer/i8254.h  | 5 +
>  include/hw/usb.h  | 4 +---
>  include/hw/virtio/virtio.h| 4 +---
>  include/hw/watchdog/wdt_aspeed.h  | 5 +
>  include/hw/xen/xen-block.h| 4 +---
>  include/hw/xen/xen-bus.h  | 4 +---
>  include/net/can_host.h| 5 +
>  include/net/filter.h  | 4 +---
>  include/ui/console.h  | 4 +---
>  hw/arm/mps2-tz.c  | 5 +
>  hw/arm/mps2.c | 5 +
>  hw/arm/musca.c| 5 +
>  hw/arm/spitz.c| 5 +
>  hw/arm/vexpress.c | 5 +
>  hw/block/m25p80.c | 5 +
>  hw/input/adb-kbd.c| 5 +
>  hw/input/adb-mouse.c  | 5 +
>  hw/misc/tmp421.c  | 5 +
>  hw/scsi/scsi-disk.c   | 5 +
>  hw/scsi/vmw_pvscsi.c  | 5 +
>  69 files changed, 69 insertions(+), 255 deletions(-)
> 
> diff --git a/hw/ppc/e500.h 

[PATCH 4/5] [automated] Use OBJECT_DECLARE_TYPE when possible

2020-09-16 Thread Eduardo Habkost
This converts existing DECLARE_OBJ_CHECKERS usage to
OBJECT_DECLARE_TYPE when possible.

 $ ./scripts/codeconverter/converter.py -i \
   --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]')

Signed-off-by: Eduardo Habkost 
---
Cc: Peter Maydell 
Cc: Andrzej Zaborowski 
Cc: Alistair Francis 
Cc: Kevin Wolf 
Cc: Max Reitz 
Cc: Mark Cave-Ayland 
Cc: David Gibson 
Cc: Richard Henderson 
Cc: David Hildenbrand 
Cc: Cornelia Huck 
Cc: Thomas Huth 
Cc: Halil Pasic 
Cc: Christian Borntraeger 
Cc: "Michael S. Tsirkin" 
Cc: Paolo Bonzini 
Cc: Fam Zheng 
Cc: Dmitry Fleytman 
Cc: Gerd Hoffmann 
Cc: "Marc-André Lureau" 
Cc: "Cédric Le Goater" 
Cc: Andrew Jeffery 
Cc: Joel Stanley 
Cc: Andrew Baumann 
Cc: "Philippe Mathieu-Daudé" 
Cc: Eric Auger 
Cc: Eduardo Habkost 
Cc: Marcel Apfelbaum 
Cc: Laurent Vivier 
Cc: Sergio Lopez 
Cc: John Snow 
Cc: Xiao Guangrong 
Cc: Peter Chubb 
Cc: "Daniel P. Berrangé" 
Cc: Beniamino Galvani 
Cc: "Edgar E. Iglesias" 
Cc: Stefano Stabellini 
Cc: Anthony Perard 
Cc: Paul Durrant 
Cc: Jason Wang 
Cc: qemu-...@nongnu.org
Cc: qemu-de...@nongnu.org
Cc: qemu-block@nongnu.org
Cc: qemu-...@nongnu.org
Cc: qemu-s3...@nongnu.org
Cc: xen-de...@lists.xenproject.org
---
 hw/ppc/e500.h | 5 +
 hw/s390x/ccw-device.h | 4 +---
 hw/s390x/virtio-ccw.h | 5 +
 hw/usb/ccid.h | 5 +
 hw/usb/hcd-dwc2.h | 3 +--
 hw/usb/hcd-ehci.h | 5 +
 hw/virtio/virtio-pci.h| 5 +
 include/chardev/char.h| 4 +---
 include/hw/arm/aspeed_soc.h   | 5 +
 include/hw/arm/bcm2836.h  | 5 +
 include/hw/arm/smmu-common.h  | 5 +
 include/hw/arm/smmuv3.h   | 5 +
 include/hw/arm/virt.h | 5 +
 include/hw/boards.h   | 3 +--
 include/hw/display/macfb.h| 5 +
 include/hw/gpio/aspeed_gpio.h | 5 +
 include/hw/i2c/aspeed_i2c.h   | 5 +
 include/hw/i386/ioapic_internal.h | 5 +
 include/hw/i386/microvm.h | 5 +
 include/hw/i386/pc.h  | 4 +---
 include/hw/i386/x86-iommu.h   | 5 +
 include/hw/i386/x86.h | 5 +
 include/hw/ide/internal.h | 4 +---
 include/hw/input/adb.h| 4 +---
 include/hw/isa/i8259_internal.h   | 5 +
 include/hw/isa/isa.h  | 4 +---
 include/hw/mem/nvdimm.h   | 5 +
 include/hw/misc/aspeed_scu.h  | 5 +
 include/hw/misc/aspeed_sdmc.h | 5 +
 include/hw/misc/imx_ccm.h | 5 +
 include/hw/misc/mos6522.h | 5 +
 include/hw/pci-host/pnv_phb4.h| 5 +
 include/hw/pci/pci.h  | 4 +---
 include/hw/pci/pci_host.h | 4 +---
 include/hw/pcmcia.h   | 5 +
 include/hw/ppc/spapr.h| 5 +
 include/hw/qdev-core.h| 4 +---
 include/hw/rtc/allwinner-rtc.h| 5 +
 include/hw/s390x/3270-ccw.h   | 5 +
 include/hw/s390x/s390-virtio-ccw.h| 5 +
 include/hw/s390x/storage-attributes.h | 5 +
 include/hw/s390x/storage-keys.h   | 5 +
 include/hw/s390x/tod.h| 5 +
 include/hw/scsi/scsi.h| 4 +---
 include/hw/sd/allwinner-sdhost.h  | 5 +
 include/hw/sd/sd.h| 5 +
 include/hw/ssi/aspeed_smc.h   | 5 +
 include/hw/ssi/xilinx_spips.h | 4 +---
 include/hw/timer/aspeed_timer.h   | 5 +
 include/hw/timer/i8254.h  | 5 +
 include/hw/usb.h  | 4 +---
 include/hw/virtio/virtio.h| 4 +---
 include/hw/watchdog/wdt_aspeed.h  | 5 +
 include/hw/xen/xen-block.h| 4 +---
 include/hw/xen/xen-bus.h  | 4 +---
 include/net/can_host.h| 5 +
 include/net/filter.h  | 4 +---
 include/ui/console.h  | 4 +---
 hw/arm/mps2-tz.c  | 5 +
 hw/arm/mps2.c | 5 +
 hw/arm/musca.c| 5 +
 hw/arm/spitz.c| 5 +
 hw/arm/vexpress.c | 5 +
 hw/block/m25p80.c | 5 +
 hw/input/adb-kbd.c| 5 +
 hw/input/adb-mouse.c  | 5 +
 hw/misc/tmp421.c  | 5 +
 hw/scsi/scsi-disk.c   | 5 +
 hw/scsi/vmw_pvscsi.c  | 5 +
 69 files changed, 69 insertions(+), 255 deletions(-)

diff --git a/hw/ppc/e500.h b/hw/ppc/e500.h
index 63870751ff..1e5853b032 100644
--- a/hw/ppc/e500.h
+++ b/hw/ppc/e500.h
@@ -14,7 +14,6 @@ struct PPCE500MachineState {
  */
 PlatformBusDevice *pbus_dev;
 };
-typedef struct PPCE500MachineState PPCE500MachineState;
 
 struct PPCE500MachineClass {
 /*< private >*/
@@ -39,14 +38,12 @@ struct PPCE500MachineClass {
 hwaddr