[PATCH 00/21] hw: More QDev cleanups

Philippe Mathieu-Daudé posted 21 patches 8 months, 2 weeks ago
Failed in applying to current master (apply log)
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Jan Kiszka <jan.kiszka@web.de>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Alistair Francis <alistair@alistair23.me>, Richard Henderson <richard.henderson@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Pavel Pisa <pisa@cmp.felk.cvut.cz>, Vikram Garhwal <fnu.vikram@xilinx.com>, Francisco Iglesias <francisco.iglesias@amd.com>, Jason Wang <jasowang@redhat.com>, Chris Wulff <crwulff@gmail.com>, Marek Vasut <marex@denx.de>, "Hervé Poussineau" <hpoussin@reactos.org>, "Cédric Le Goater" <clg@kaod.org>, Nicholas Piggin <npiggin@gmail.com>, "Frédéric Barrat" <fbarrat@linux.ibm.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Gerd Hoffmann <kraxel@redhat.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Max Filippov <jcmvbkbc@gmail.com>
include/hw/isa/isa.h                     |  1 -
include/hw/net/ne2000-isa.h              |  2 +-
include/hw/tricore/tricore_testdevice.h  |  3 ---
include/hw/usb.h                         |  1 -
hw/arm/mps2.c                            |  5 +++++
hw/arm/musicpal.c                        |  2 +-
hw/core/qdev.c                           |  2 +-
hw/core/register.c                       |  2 +-
hw/i386/amd_iommu.c                      |  6 +++---
hw/i386/pc.c                             |  6 +++---
hw/i386/pc_sysfw.c                       |  6 ++----
hw/i386/x86.c                            |  1 +
hw/isa/isa-bus.c                         |  5 -----
hw/microblaze/petalogix_ml605_mmu.c      |  1 +
hw/microblaze/petalogix_s3adsp1800_mmu.c |  1 +
hw/mips/cps.c                            |  1 +
hw/net/can/xlnx-versal-canfd.c           |  2 +-
hw/nios2/10m50_devboard.c                |  1 +
hw/pci-host/q35.c                        |  6 +++---
hw/pci-host/raven.c                      | 18 ++++++++----------
hw/pci-host/versatile.c                  |  3 ++-
hw/ppc/e500.c                            |  1 +
hw/ppc/pnv_bmc.c                         | 10 +++++-----
hw/ppc/spapr.c                           |  1 +
hw/ppc/spapr_cpu_core.c                  |  3 +--
hw/s390x/s390-pci-bus.c                  |  1 +
hw/sparc/sun4m.c                         |  4 ++--
hw/tricore/tricore_testboard.c           |  4 +---
hw/usb/bus.c                             | 17 ++++-------------
hw/usb/dev-serial.c                      |  2 +-
target/mips/cpu.c                        |  2 +-
target/xtensa/cpu.c                      |  2 +-
32 files changed, 55 insertions(+), 67 deletions(-)
[PATCH 00/21] hw: More QDev cleanups
Posted by Philippe Mathieu-Daudé 8 months, 2 weeks ago
Various QDev cleanups extracted to my "enforce QDev API" branch.
- When available, instead of plain QOM, use QDev API equivalent
- Add missing QOM parentship for some obj created with qdev_*new()
- Prefer object_initialize_child() over object_initialize()

Philippe Mathieu-Daudé (21):
  hw/i386/pc: Do not use C99 mixed-declarations style
  hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API
  hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API
  hw/tricore/testboard: Use qdev_new() instead of QOM basic API
  hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API
  hw: Replace DEVICE(object_new) -> qdev_new()
  target: Replace DEVICE(object_new) -> qdev_new()
  hw/isa: Inline isa_try_new()
  hw/usb: Inline usb_try_new()
  hw/usb: Inline usb_new()
  hw/usb: Add QOM parentship relation with hub devices
  hw/pci-host/q35: Update q35_host_props[] comment
  hw/pci-host/raven: Embedded OrIRQ in PRePPCIState
  hw/pci-host/raven: Prefer object_initialize_child over
    object_initialize
  hw/core/register: Prefer object_initialize_child over
    object_initialize
  hw/net/can/versal: Prefer object_initialize_child over
    object_initialize
  hw/i386/iommu: Prefer object_initialize_child over object_initialize
  hw/pci-host/versatile: Replace object_initialize() -> _child()
  hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices
  hw/arm/mps2: Add QOM parentship relation with OR IRQ gates
  hw: Add QOM parentship relation with CPUs

 include/hw/isa/isa.h                     |  1 -
 include/hw/net/ne2000-isa.h              |  2 +-
 include/hw/tricore/tricore_testdevice.h  |  3 ---
 include/hw/usb.h                         |  1 -
 hw/arm/mps2.c                            |  5 +++++
 hw/arm/musicpal.c                        |  2 +-
 hw/core/qdev.c                           |  2 +-
 hw/core/register.c                       |  2 +-
 hw/i386/amd_iommu.c                      |  6 +++---
 hw/i386/pc.c                             |  6 +++---
 hw/i386/pc_sysfw.c                       |  6 ++----
 hw/i386/x86.c                            |  1 +
 hw/isa/isa-bus.c                         |  5 -----
 hw/microblaze/petalogix_ml605_mmu.c      |  1 +
 hw/microblaze/petalogix_s3adsp1800_mmu.c |  1 +
 hw/mips/cps.c                            |  1 +
 hw/net/can/xlnx-versal-canfd.c           |  2 +-
 hw/nios2/10m50_devboard.c                |  1 +
 hw/pci-host/q35.c                        |  6 +++---
 hw/pci-host/raven.c                      | 18 ++++++++----------
 hw/pci-host/versatile.c                  |  3 ++-
 hw/ppc/e500.c                            |  1 +
 hw/ppc/pnv_bmc.c                         | 10 +++++-----
 hw/ppc/spapr.c                           |  1 +
 hw/ppc/spapr_cpu_core.c                  |  3 +--
 hw/s390x/s390-pci-bus.c                  |  1 +
 hw/sparc/sun4m.c                         |  4 ++--
 hw/tricore/tricore_testboard.c           |  4 +---
 hw/usb/bus.c                             | 17 ++++-------------
 hw/usb/dev-serial.c                      |  2 +-
 target/mips/cpu.c                        |  2 +-
 target/xtensa/cpu.c                      |  2 +-
 32 files changed, 55 insertions(+), 67 deletions(-)

-- 
2.41.0