On 8/6/21 11:11 PM, Eduardo Habkost wrote:
> Replace typedef + DECLARE_INSTANCE_CHECKER with
> equivalent OBJECT_DECLARE_SIMPLE_TYPE macro.
> 
> Generated using:
> 
> $ ./scripts/codeconverter/converter.py -i \
>   --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
> 
> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> Cc: Thomas Huth <h...@tuxfamily.org>
> Cc: Paul Burton <paulbur...@kernel.org>
> Cc: Aleksandar Rikalo <aleksandar.rik...@syrmia.com>
> Cc: "Philippe Mathieu-Daudé" <f4...@amsat.org>
> Cc: Aurelien Jarno <aurel...@aurel32.net>
> Cc: Jiaxun Yang <jiaxun.y...@flygoat.com>
> Cc: Havard Skinnemoen <hskinnem...@google.com>
> Cc: Tyrone Ting <kft...@nuvoton.com>
> Cc: Pavel Pisa <p...@cmp.felk.cvut.cz>
> Cc: Vikram Garhwal <fnu.vik...@xilinx.com>
> Cc: Jason Wang <jasow...@redhat.com>
> Cc: Keith Busch <kbu...@kernel.org>
> Cc: Klaus Jensen <i...@irrelevant.dk>
> Cc: "Michael S. Tsirkin" <m...@redhat.com>
> Cc: Richard Henderson <richard.hender...@linaro.org>
> Cc: David Hildenbrand <da...@redhat.com>
> Cc: Cornelia Huck <coh...@redhat.com>
> Cc: Halil Pasic <pa...@linux.ibm.com>
> Cc: Christian Borntraeger <borntrae...@de.ibm.com>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> Cc: Vijai Kumar K <vi...@behindbytes.com>
> Cc: Alistair Francis <alistair.fran...@wdc.com>
> Cc: Bin Meng <bin.m...@windriver.com>
> Cc: Palmer Dabbelt <pal...@dabbelt.com>
> Cc: "Edgar E. Iglesias" <edgar.igles...@gmail.com>
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Cc: Laurent Vivier <laur...@vivier.eu>
> Cc: "Cédric Le Goater" <c...@kaod.org>
> Cc: Andrew Jeffery <and...@aj.id.au>
> Cc: Joel Stanley <j...@jms.id.au>
> Cc: Andrew Baumann <andrew.baum...@microsoft.com>
> Cc: Francisco Iglesias <francisco.igles...@xilinx.com>
> Cc: David Gibson <da...@gibson.dropbear.id.au>
> Cc: Greg Kurz <gr...@kaod.org>
> Cc: Bastian Koppelmann <kbast...@mail.uni-paderborn.de>
> Cc: qemu-de...@nongnu.org
> Cc: qemu-...@nongnu.org
> Cc: qemu-block@nongnu.org
> Cc: qemu-s3...@nongnu.org
> Cc: qemu-ri...@nongnu.org
> Cc: qemu-...@nongnu.org
> ---
>  hw/nvme/nvme.h                              | 10 +++-------
>  hw/usb/hcd-xhci-pci.h                       |  4 +---
>  hw/usb/hcd-xhci-sysbus.h                    |  4 +---
>  include/hw/adc/npcm7xx_adc.h                |  4 +---
>  include/hw/char/shakti_uart.h               |  4 +---
>  include/hw/dma/sifive_pdma.h                |  4 +---
>  include/hw/dma/xlnx_csu_dma.h               |  4 +---
>  include/hw/gpio/sifive_gpio.h               |  4 +---
>  include/hw/intc/m68k_irqc.h                 |  4 +---
>  include/hw/intc/sifive_clint.h              |  4 +---
>  include/hw/intc/sifive_plic.h               |  4 +---
>  include/hw/misc/aspeed_lpc.h                |  4 +---
>  include/hw/misc/bcm2835_cprman_internals.h  | 12 ++++--------
>  include/hw/misc/led.h                       |  3 +--
>  include/hw/misc/mchp_pfsoc_dmc.h            |  8 ++------
>  include/hw/misc/mchp_pfsoc_ioscb.h          |  4 +---
>  include/hw/misc/mchp_pfsoc_sysreg.h         |  4 +---
>  include/hw/misc/npcm7xx_clk.h               |  3 +--
>  include/hw/misc/npcm7xx_gcr.h               |  4 +---
>  include/hw/misc/npcm7xx_mft.h               |  4 +---
>  include/hw/misc/npcm7xx_pwm.h               |  3 +--
>  include/hw/misc/sifive_e_prci.h             |  4 +---
>  include/hw/misc/sifive_test.h               |  4 +---
>  include/hw/misc/sifive_u_otp.h              |  4 +---
>  include/hw/misc/sifive_u_prci.h             |  4 +---
>  include/hw/misc/xlnx-versal-xramc.h         |  4 +---
>  include/hw/net/npcm7xx_emc.h                |  4 +---
>  include/hw/net/xlnx-zynqmp-can.h            |  4 +---
>  include/hw/ppc/spapr_drc.h                  |  4 +---
>  include/hw/register.h                       |  3 +--
>  include/hw/riscv/microchip_pfsoc.h          |  4 +---
>  include/hw/riscv/shakti_c.h                 |  8 ++------
>  include/hw/riscv/sifive_e.h                 |  4 +---
>  include/hw/riscv/sifive_u.h                 |  4 +---
>  include/hw/sd/cadence_sdhci.h               |  4 +---
>  include/hw/ssi/sifive_spi.h                 |  4 +---
>  include/hw/timer/npcm7xx_timer.h            |  3 +--
>  include/hw/tricore/tricore_testdevice.h     |  4 +---
>  include/hw/usb/hcd-dwc3.h                   |  4 +---
>  include/hw/usb/xlnx-versal-usb2-ctrl-regs.h |  4 +---
>  hw/m68k/mcf5206.c                           |  4 +---
>  hw/mips/boston.c                            |  4 +---
>  hw/misc/npcm7xx_clk.c                       |  9 +++------
>  hw/net/can/ctucan_pci.c                     |  4 +---
>  hw/s390x/vhost-user-fs-ccw.c                |  4 +---
>  hw/sensor/adm1272.c                         |  4 +---
>  hw/sensor/max34451.c                        |  4 +---
>  47 files changed, 56 insertions(+), 154 deletions(-)

> diff --git a/include/hw/usb/xlnx-versal-usb2-ctrl-regs.h 
> b/include/hw/usb/xlnx-versal-usb2-ctrl-regs.h
> index 701302ad044..2576193e673 100644
> --- a/include/hw/usb/xlnx-versal-usb2-ctrl-regs.h
> +++ b/include/hw/usb/xlnx-versal-usb2-ctrl-regs.h
> @@ -29,9 +29,7 @@
>  
>  #define TYPE_XILINX_VERSAL_USB2_CTRL_REGS "xlnx.versal-usb2-ctrl-regs"
>  
> -typedef struct VersalUsb2CtrlRegs VersalUsb2CtrlRegs;
> -DECLARE_INSTANCE_CHECKER(VersalUsb2CtrlRegs, XILINX_VERSAL_USB2_CTRL_REGS,
> -                         TYPE_XILINX_VERSAL_USB2_CTRL_REGS)
> +OBJECT_DECLARE_SIMPLE_TYPE(VersalUsb2CtrlRegs, XILINX_VERSAL_USB2_CTRL_REGS)

Unrelated to this patch, we should remove the _regs suffix from
this model.

Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reply via email to