aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@163.com>2018-11-03 08:41:04 -0700
committerMichael S. Tsirkin <mst@redhat.com>2019-02-05 10:58:33 -0500
commit3f262b26b82cf5930f0c294d289f258a6d3d2528 (patch)
tree23b12c828a3eae1a0b1249aa2ec0852c96944f3e /hw/virtio
parentda054c646c777bcb487326f46cd5bf9932b05128 (diff)
downloadqemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.zip
qemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.tar.gz
qemu-3f262b26b82cf5930f0c294d289f258a6d3d2528.tar.bz2
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')
-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 b282109..e978bfe 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 &&