These patches apply to Paolo Bonzini's rcu tree: https://github.com/bonzini/qemu/tree/rcu commit 781e47bf1693a80b84eec298a6a1c7b29ab2c135
Signed-off-by: Mike Day <ncm...@ncultra.org> --- hw/misc/ivshmem.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 6 +++--- hw/pci/pci_bridge.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ebcb52a..46d8c27 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -789,7 +789,7 @@ static void pci_ivshmem_uninit(PCIDevice *dev) static void pci_ivshmem_instance_finalize(Object *obj) { - IVShmemState *s = IVSHMEM(dev); + IVShmemState *s = IVSHMEM(obj); if (s->migration_blocker) { migrate_del_blocker(s->migration_blocker); diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index c995d5d..22caf14 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -87,7 +87,6 @@ shpc_error: bridge_error: return err; } - static void pci_bridge_dev_exitfn(PCIDevice *dev) { PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(dev); @@ -102,8 +101,9 @@ static void pci_bridge_dev_exitfn(PCIDevice *dev) static void pci_bridge_dev_instance_finalize(Object *obj) { PCIDevice *dev = PCI_DEVICE(obj); - PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev); - PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br); + PCIBridge *br = PCI_BRIDGE(dev); + PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(br); + shpc_free(dev); memory_region_destroy(&bridge_dev->bar); pci_bridge_free(dev); diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index 63f9912..307e076 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -391,7 +391,7 @@ void pci_bridge_exitfn(PCIDevice *pci_dev) void pci_bridge_free(PCIDevice *pci_dev) { - PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev); + PCIBridge *s = PCI_BRIDGE(pci_dev); pci_bridge_region_cleanup(s, s->windows); memory_region_destroy(&s->address_space_mem); memory_region_destroy(&s->address_space_io); -- 1.8.3.1