Message ID | 20230213070423.76428-5-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | hw/qdev: Housekeeping around qdev_get_parent_bus() | expand |
On Mon, Feb 13, 2023 at 08:04:18AM +0100, Philippe Mathieu-Daudé wrote: > DeviceState::parent_bus is an internal field and should be > accessed by the qdev_get_parent_bus() helper. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> > --- > hw/net/virtio-net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 3ae909041a..8bc160ab59 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -3423,7 +3423,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, > if (!pdev->partially_hotplugged) { > return true; > } > - primary_bus = dev->parent_bus; > + primary_bus = qdev_get_parent_bus(dev); > if (!primary_bus) { > error_setg(errp, "virtio_net: couldn't find primary bus"); > return false; > -- > 2.38.1
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3ae909041a..8bc160ab59 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3423,7 +3423,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, if (!pdev->partially_hotplugged) { return true; } - primary_bus = dev->parent_bus; + primary_bus = qdev_get_parent_bus(dev); if (!primary_bus) { error_setg(errp, "virtio_net: couldn't find primary bus"); return false;
DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)