[PATCH v2 0/9] hw/qdev: Housekeeping around qdev_get_parent_bus()

Philippe Mathieu-Daudé posted 9 patches 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230213070423.76428-1-philmd@linaro.org
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>, Fam Zheng <fam@euphon.net>, "Gonglei (Arei)" <arei.gonglei@huawei.com>
hw/audio/intel-hda.c                | 10 +++++-----
hw/block/fdc.c                      |  2 +-
hw/block/swim.c                     |  2 +-
hw/core/qdev-fw.c                   |  9 +++++----
hw/core/qdev.c                      |  2 +-
hw/ide/qdev.c                       |  6 +++---
hw/net/virtio-net.c                 |  2 +-
hw/pci-bridge/pci_expander_bridge.c |  2 +-
hw/ppc/spapr_vio.c                  |  4 ++--
hw/scsi/scsi-bus.c                  | 18 +++++++++---------
hw/usb/bus.c                        |  2 +-
hw/usb/desc.c                       |  2 +-
hw/usb/dev-smartcard-reader.c       | 16 ++++++++--------
include/hw/qdev-core.h              |  4 ++--
include/hw/scsi/scsi.h              |  2 +-
include/hw/usb.h                    |  2 +-
softmmu/bootdevice.c                |  2 +-
softmmu/qdev-monitor.c              |  6 +++---
18 files changed, 47 insertions(+), 46 deletions(-)
[PATCH v2 0/9] hw/qdev: Housekeeping around qdev_get_parent_bus()
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
v2: Convert more qdev_get_parent_bus()

DeviceState::parent_bus is an internal field and should be
accessed by the qdev_get_parent_bus() helper. Replace most uses.

Philippe Mathieu-Daudé (9):
  hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()
  hw/audio: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw/block: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw/net: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw/pci: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw/ppc: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw/usb: Replace dev->parent_bus by qdev_get_parent_bus(dev)
  hw: Use qdev_get_parent_bus() in
    qdev_get_own_fw_dev_path_from_handler()
  qdev-monitor: Use qdev_get_parent_bus() in bus_print_dev()

 hw/audio/intel-hda.c                | 10 +++++-----
 hw/block/fdc.c                      |  2 +-
 hw/block/swim.c                     |  2 +-
 hw/core/qdev-fw.c                   |  9 +++++----
 hw/core/qdev.c                      |  2 +-
 hw/ide/qdev.c                       |  6 +++---
 hw/net/virtio-net.c                 |  2 +-
 hw/pci-bridge/pci_expander_bridge.c |  2 +-
 hw/ppc/spapr_vio.c                  |  4 ++--
 hw/scsi/scsi-bus.c                  | 18 +++++++++---------
 hw/usb/bus.c                        |  2 +-
 hw/usb/desc.c                       |  2 +-
 hw/usb/dev-smartcard-reader.c       | 16 ++++++++--------
 include/hw/qdev-core.h              |  4 ++--
 include/hw/scsi/scsi.h              |  2 +-
 include/hw/usb.h                    |  2 +-
 softmmu/bootdevice.c                |  2 +-
 softmmu/qdev-monitor.c              |  6 +++---
 18 files changed, 47 insertions(+), 46 deletions(-)

-- 
2.38.1


Re: [PATCH v2 0/9] hw/qdev: Housekeeping around qdev_get_parent_bus()
Posted by Michael S. Tsirkin 1 year, 2 months ago
On Mon, Feb 13, 2023 at 08:04:14AM +0100, Philippe Mathieu-Daudé wrote:
> v2: Convert more qdev_get_parent_bus()
> 
> DeviceState::parent_bus is an internal field and should be
> accessed by the qdev_get_parent_bus() helper. Replace most uses.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

who's merging this?


> Philippe Mathieu-Daudé (9):
>   hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()
>   hw/audio: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw/block: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw/net: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw/pci: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw/ppc: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw/usb: Replace dev->parent_bus by qdev_get_parent_bus(dev)
>   hw: Use qdev_get_parent_bus() in
>     qdev_get_own_fw_dev_path_from_handler()
>   qdev-monitor: Use qdev_get_parent_bus() in bus_print_dev()
> 
>  hw/audio/intel-hda.c                | 10 +++++-----
>  hw/block/fdc.c                      |  2 +-
>  hw/block/swim.c                     |  2 +-
>  hw/core/qdev-fw.c                   |  9 +++++----
>  hw/core/qdev.c                      |  2 +-
>  hw/ide/qdev.c                       |  6 +++---
>  hw/net/virtio-net.c                 |  2 +-
>  hw/pci-bridge/pci_expander_bridge.c |  2 +-
>  hw/ppc/spapr_vio.c                  |  4 ++--
>  hw/scsi/scsi-bus.c                  | 18 +++++++++---------
>  hw/usb/bus.c                        |  2 +-
>  hw/usb/desc.c                       |  2 +-
>  hw/usb/dev-smartcard-reader.c       | 16 ++++++++--------
>  include/hw/qdev-core.h              |  4 ++--
>  include/hw/scsi/scsi.h              |  2 +-
>  include/hw/usb.h                    |  2 +-
>  softmmu/bootdevice.c                |  2 +-
>  softmmu/qdev-monitor.c              |  6 +++---
>  18 files changed, 47 insertions(+), 46 deletions(-)
> 
> -- 
> 2.38.1
> 
> 
> 
Re: [PATCH v2 0/9] hw/qdev: Housekeeping around qdev_get_parent_bus()
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
On 13/2/23 11:53, Michael S. Tsirkin wrote:
> On Mon, Feb 13, 2023 at 08:04:14AM +0100, Philippe Mathieu-Daudé wrote:
>> v2: Convert more qdev_get_parent_bus()
>>
>> DeviceState::parent_bus is an internal field and should be
>> accessed by the qdev_get_parent_bus() helper. Replace most uses.
> 
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

Thanks!

> who's merging this?

Oh I forgot to mention. Probably easier if I merge this myself as a
hw/ omnibus pullreq with various other similar series, so I deal with
the rebase issues.