|
From: | Richard Henderson |
Subject: | Re: [PATCH 2/4] hw: Replace dev->parent_bus by qdev_get_parent_bus(dev) |
Date: | Mon, 13 Feb 2023 13:19:36 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
On 2/12/23 13:03, Philippe Mathieu-Daudé wrote:
On 12/2/23 23:47, Philippe Mathieu-Daudé wrote:DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Replace all uses in hw/ except the QDev uses in hw/core/. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/audio/intel-hda.c | 2 +- hw/block/fdc.c | 2 +- hw/block/swim.c | 2 +- hw/ide/qdev.c | 4 ++-- hw/net/virtio-net.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/usb/bus.c | 2 +- hw/usb/desc.c | 2 +- hw/usb/dev-smartcard-reader.c | 16 ++++++++-------- 10 files changed, 18 insertions(+), 18 deletions(-)I missed:
Did you use a temporary rename of the field to catch all the uses?
void hda_codec_response(HDACodecDevice *dev, bool solicited, uint32_t response) { - HDACodecBus *bus = HDA_BUS(dev->qdev.parent_bus); + HDACodecBus *bus = HDA_BUS(qdev_get_parent_bus(DEVICE(dev)));
I'm never sure the cast is clearer than &dev->qdev. But it seems the normal way in qemu... Acked-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |