summaryrefslogtreecommitdiffstats
path: root/hw/virtio/virtio-pci.c
diff options
context:
space:
mode:
authorLi Qiang2018-11-03 16:41:04 +0100
committerMichael S. Tsirkin2019-02-05 16:58:33 +0100
commit3f262b26b82cf5930f0c294d289f258a6d3d2528 (patch)
tree23b12c828a3eae1a0b1249aa2ec0852c96944f3e /hw/virtio/virtio-pci.c
parentinclude: update Linux headers to 4.21-rc1/5.0-rc1 (diff)
downloadqemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.tar.gz
qemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.tar.xz
qemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.zip
hw: virtio-pci: drop DO_UPCAST
Use VIRTIO_PCI MACRO instead. Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-pci.c')
-rw-r--r--hw/virtio/virtio-pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index b282109343..e978bfe760 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -591,7 +591,7 @@ virtio_address_space_read(VirtIOPCIProxy *proxy, hwaddr addr,
static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
uint32_t val, int len)
{
- VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
+ VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
struct virtio_pci_cfg_cap *cfg;
@@ -624,7 +624,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
static uint32_t virtio_read_config(PCIDevice *pci_dev,
uint32_t address, int len)
{
- VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
+ VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
struct virtio_pci_cfg_cap *cfg;
if (proxy->config_cap &&