Skip to content

hw: Use QOM macros and remove DO_UPCAST() uses

Philippe Mathieu-Daudé qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/214 patches 10 repliesIn review
  2. v3 posting 1/26 patches 8 repliesSuperseded
  3. v219 patches 14 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v119 patches1 replySuperseded

Changes in v3 from the cover letter

- Corrected TYPE_PCI_MULTISERIAL string
- Split EEPRO100 series out:
https://lore.kernel.org/qemu-devel/[email protected]/
- Split VFIO_CCW series out:
https://lore.kernel.org/qemu-devel/[email protected]/
- Removed "Inline usb_bus_from_device()" RFC patch v2:
- Rebased

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14hw/char/serial-pci: Replace DO_UPCAST(PCISerialState) by PCI_SERIAL()hw/char/serial-pci.c+5 -24 replies
2/14hw/char/serial-pci-multi: Batch register types using DEFINE_TYPES macrohw/char/serial-pci-multi.c+23 -290 replies
3/14hw/char/serial-pci-multi: Introduce PCI_MULTISERIAL QOM abstract parenthw/char/serial-pci-multi.c+20 -150 replies
4/14hw/char/serial-pci-multi: Factor multi_serial_class_initfn() outhw/char/serial-pci-multi.c+13 -91 reply
5/14hw/char/serial-pci-multi: Replace DO_UPCAST() by PCI_MULTISERIAL()hw/char/serial-pci-multi.c+4 -60 replies
6/14hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE()hw/ide/qdev.c+1 -10 replies
7/14hw/ide/qdev: Replace DO_UPCAST(IDEBus) by IDE_BUS()hw/ide/qdev.c+4 -40 replies
8/14hw/net/ne2000-pci: Replace DO_UPCAST(PCINE2000State) by PCI_NE2000()hw/net/ne2000-pci.c+12 -61 reply
9/14hw/net/tulip: Finish QOM conversionhw/net/tulip.c+11 -92 replies
10/14hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS()hw/pci/pci.c+1 -10 replies
11/14hw/scsi/scsi-bus: Replace DO_UPCAST(SCSIBus) by SCSI_BUS()hw/scsi/scsi-bus.c include/hw/scsi/scsi.h+7 -70 replies
12/14hw/scsi/scsi-bus: Inline two uses of scsi_bus_from_device()hw/s390x/ipl.c hw/scsi/scsi-bus.c include/hw/scsi/scsi.h+3 -110 replies
13/14hw/usb/dev-hub: Use QOM USB_HUB() macro instead of castinghw/usb/dev-hub.c+3 -30 replies
14/14hw/usb: Replace DO_UPCAST(USBBus) by USB_BUS()include/hw/usb.h+1 -10 replies

Reviews trailers per patch

2 of 14 patches have a Reviewed-by or Acked-by.

PatchEric FarmanJason Wang
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14A-b
10/14
11/14
12/14A-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/14] hw: Use QOM macros and remove DO_UPCAST() uses

v3:
- Corrected TYPE_PCI_MULTISERIAL string
- Split EEPRO100 series out:
https://lore.kernel.org/qemu-devel/[email protected]/
- Split VFIO_CCW series out:
https://lore.kernel.org/qemu-devel/[email protected]/
- Removed "Inline usb_bus_from_device()" RFC patch v2:
- Rebased

QOM housekeeping series which replace the DO_UPCAST() macro uses by equivalent QOM ones. Also:
- Use DEVICE() macro
- Define some TYPE_xxx
- Define some type arrays using DEFINE_TYPES() macro
- Introduce abstract QOM (QDev) parent when relevant.

Based-on: <[email protected]>
hw/qdev: Housekeeping around qdev_get_parent_bus()

Philippe Mathieu-Daudé (14):
hw/char/serial-pci: Replace DO_UPCAST(PCISerialState) by PCI_SERIAL() hw/char/serial-pci-multi: Batch register types using DEFINE_TYPES
macro
hw/char/serial-pci-multi: Introduce PCI_MULTISERIAL QOM abstract
parent
hw/char/serial-pci-multi: Factor multi_serial_class_initfn() out hw/char/serial-pci-multi: Replace DO_UPCAST() by PCI_MULTISERIAL() hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE() hw/ide/qdev: Replace DO_UPCAST(IDEBus) by IDE_BUS() hw/net/ne2000-pci: Replace DO_UPCAST(PCINE2000State) by PCI_NE2000() hw/net/tulip: Finish QOM conversion
hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS() hw/scsi/scsi-bus: Replace DO_UPCAST(SCSIBus) by SCSI_BUS() hw/scsi/scsi-bus: Inline two uses of scsi_bus_from_device() hw/usb/dev-hub: Use QOM USB_HUB() macro instead of casting hw/usb: Replace DO_UPCAST(USBBus) by USB_BUS()

 hw/char/serial-pci-multi.c | 93 +++++++++++++++++++-------------------
 hw/char/serial-pci.c       |  7 ++-
 hw/ide/qdev.c              | 10 ++--
 hw/net/ne2000-pci.c        | 18 +++++---
 hw/net/tulip.c             | 20 ++++----
 hw/pci/pci.c               |  2 +-
 hw/s390x/ipl.c             |  7 +--
 hw/scsi/scsi-bus.c         | 14 +++---
 hw/usb/dev-hub.c           |  6 +--
 include/hw/scsi/scsi.h     |  5 --
 include/hw/usb.h           |  2 +-
 11 files changed, 94 insertions(+), 90 deletions(-)
Signature · 1 line
2.38.1