On 8/6/21 11:11 PM, Eduardo Habkost wrote:
> Some typedefs and macros are defined after the type check macros.
> This makes it difficult to automatically replace their
> definitions with OBJECT_DECLARE_TYPE.
> 
> Patch generated using:
> 
>  $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
>     $(git grep -l '' -- '*.[ch]')
> 
> which will:
> - split "typdef struct { ... } TypedefName" declarations
> - move the typedefs and #defines above the type check macros
> - add missing #include "qom/object.h" lines if necessary
> 
> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> Cc: Richard Henderson <richard.hender...@linaro.org>
> Cc: Paolo Bonzini <pbonz...@redhat.com>
> Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com>
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Cc: Andrew Baumann <andrew.baum...@microsoft.com>
> Cc: "Philippe Mathieu-Daudé" <f4...@amsat.org>
> Cc: Thomas Huth <h...@tuxfamily.org>
> Cc: "Michael S. Tsirkin" <m...@redhat.com>
> Cc: Igor Mammedov <imamm...@redhat.com>
> Cc: Alexander Bulekov <alx...@bu.edu>
> Cc: Bandan Das <b...@redhat.com>
> Cc: Stefan Hajnoczi <stefa...@redhat.com>
> Cc: Huacai Chen <chenhua...@kernel.org>
> Cc: Jiaxun Yang <jiaxun.y...@flygoat.com>
> Cc: Aurelien Jarno <aurel...@aurel32.net>
> Cc: Aleksandar Rikalo <aleksandar.rik...@syrmia.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: Cornelia Huck <coh...@redhat.com>
> Cc: Halil Pasic <pa...@linux.ibm.com>
> Cc: Christian Borntraeger <borntrae...@de.ibm.com>
> Cc: David Hildenbrand <da...@redhat.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: Laurent Vivier <laur...@vivier.eu>
> Cc: Corey Minyard <miny...@acm.org>
> Cc: "Cédric Le Goater" <c...@kaod.org>
> Cc: Andrew Jeffery <and...@aj.id.au>
> Cc: Joel Stanley <j...@jms.id.au>
> Cc: Francisco Iglesias <francisco.igles...@xilinx.com>
> Cc: David Gibson <da...@gibson.dropbear.id.au>
> Cc: Greg Kurz <gr...@kaod.org>
> Cc: Alexey Kardashevskiy <a...@ozlabs.ru>
> Cc: "Hervé Poussineau" <hpous...@reactos.org>
> Cc: Bastian Koppelmann <kbast...@mail.uni-paderborn.de>
> Cc: Juan Quintela <quint...@redhat.com>
> Cc: "Dr. David Alan Gilbert" <dgilb...@redhat.com>
> Cc: "Daniel P. Berrangé" <berra...@redhat.com>
> Cc: Eduardo Habkost <ehabk...@redhat.com>
> Cc: Stefan Berger <stef...@linux.vnet.ibm.com>
> Cc: Taylor Simpson <tsimp...@quicinc.com>
> Cc: qemu-devel@nongnu.org
> Cc: qemu-...@nongnu.org
> Cc: qemu-bl...@nongnu.org
> Cc: qemu-s3...@nongnu.org
> Cc: qemu-ri...@nongnu.org
> Cc: qemu-...@nongnu.org
> ---
>  hw/nvme/nvme.h                              |  6 ++++--
>  hw/usb/hcd-uhci.h                           |  1 +
>  hw/usb/hcd-xhci-pci.h                       |  6 ++++--
>  hw/usb/hcd-xhci-sysbus.h                    |  6 ++++--
>  hw/usb/u2f.h                                |  6 ++++--
>  include/hw/acpi/acpi_dev_interface.h        |  2 +-
>  include/hw/adc/npcm7xx_adc.h                |  1 +
>  include/hw/arm/linux-boot-if.h              |  2 +-
>  include/hw/arm/npcm7xx.h                    | 11 +++++++----
>  include/hw/char/shakti_uart.h               |  6 ++++--
>  include/hw/core/accel-cpu.h                 |  1 +
>  include/hw/dma/sifive_pdma.h                |  1 +
>  include/hw/dma/xlnx_csu_dma.h               |  1 +
>  include/hw/fw-path-provider.h               |  2 +-
>  include/hw/gpio/npcm7xx_gpio.h              |  1 +
>  include/hw/hotplug.h                        |  2 +-
>  include/hw/i2c/npcm7xx_smbus.h              |  1 +
>  include/hw/intc/intc.h                      |  2 +-
>  include/hw/intc/m68k_irqc.h                 |  6 ++++--
>  include/hw/intc/sifive_clint.h              |  6 ++++--
>  include/hw/ipmi/ipmi.h                      |  2 +-
>  include/hw/mem/memory-device.h              |  2 +-
>  include/hw/mem/npcm7xx_mc.h                 |  1 +
>  include/hw/misc/aspeed_lpc.h                |  6 ++++--
>  include/hw/misc/bcm2835_cprman.h            |  1 +
>  include/hw/misc/bcm2835_cprman_internals.h  |  1 +
>  include/hw/misc/mchp_pfsoc_dmc.h            |  1 +
>  include/hw/misc/mchp_pfsoc_ioscb.h          |  1 +
>  include/hw/misc/mchp_pfsoc_sysreg.h         |  1 +
>  include/hw/misc/npcm7xx_clk.h               |  1 +
>  include/hw/misc/npcm7xx_gcr.h               |  1 +
>  include/hw/misc/npcm7xx_pwm.h               |  1 +
>  include/hw/misc/npcm7xx_rng.h               |  1 +
>  include/hw/misc/xlnx-versal-xramc.h         |  6 ++++--
>  include/hw/net/npcm7xx_emc.h                |  1 +
>  include/hw/net/xlnx-zynqmp-can.h            |  6 ++++--
>  include/hw/nmi.h                            |  2 +-
>  include/hw/nvram/npcm7xx_otp.h              |  1 +
>  include/hw/ppc/spapr_drc.h                  | 15 +++++++++------
>  include/hw/ppc/spapr_xive.h                 | 11 +++++++----
>  include/hw/ppc/vof.h                        |  1 +
>  include/hw/rdma/rdma.h                      |  2 +-
>  include/hw/riscv/microchip_pfsoc.h          |  1 +
>  include/hw/riscv/shakti_c.h                 | 11 +++++++----
>  include/hw/riscv/sifive_e.h                 |  6 ++++--
>  include/hw/riscv/sifive_u.h                 | 11 +++++++----
>  include/hw/rtc/m48t59.h                     |  2 +-
>  include/hw/sd/cadence_sdhci.h               |  1 +
>  include/hw/ssi/npcm7xx_fiu.h                |  1 +
>  include/hw/ssi/sifive_spi.h                 |  6 ++++--
>  include/hw/stream.h                         |  2 +-
>  include/hw/timer/npcm7xx_timer.h            |  1 +
>  include/hw/tricore/tricore_testdevice.h     |  6 ++++--
>  include/hw/usb/hcd-dwc3.h                   |  6 ++++--
>  include/hw/usb/msd.h                        |  1 +
>  include/hw/usb/xlnx-usb-subsystem.h         |  6 ++++--
>  include/hw/usb/xlnx-versal-usb2-ctrl-regs.h |  6 ++++--
>  include/hw/vmstate-if.h                     |  2 +-
>  include/hw/watchdog/sbsa_gwdt.h             |  6 ++++--
>  include/qom/object_interfaces.h             |  2 +-
>  include/sysemu/tpm.h                        |  2 +-
>  target/arm/idau.h                           |  2 +-
>  target/hexagon/cpu.h                        | 11 +++++++----
>  accel/tcg/tcg-all.c                         |  1 +
>  chardev/char-parallel.c                     |  1 +
>  hw/arm/bcm2836.c                            |  1 +
>  hw/m68k/mcf5206.c                           |  1 +
>  hw/mem/sparse-mem.c                         |  6 ++++--
>  hw/mips/loongson3_virt.c                    |  1 +
>  hw/misc/npcm7xx_clk.c                       |  1 +
>  hw/misc/sbsa_ec.c                           |  1 +
>  hw/net/can/ctucan_pci.c                     |  1 +
>  hw/nvram/npcm7xx_otp.c                      |  1 +
>  hw/s390x/vhost-user-fs-ccw.c                |  1 +
>  hw/sensor/adm1272.c                         |  6 ++++--
>  hw/sensor/max34451.c                        |  6 ++++--
>  hw/usb/u2f-emulated.c                       |  1 +
>  hw/usb/u2f-passthru.c                       |  1 +
>  hw/virtio/vhost-user-i2c-pci.c              |  1 +
>  tests/unit/check-qom-interface.c            |  2 +-
>  ui/vdagent.c                                |  1 +
>  81 files changed, 179 insertions(+), 82 deletions(-)

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

Reply via email to