Message ID | 1232027262-21487-6-git-send-email-markmc@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index d5eb7b2..f8faf5b 100644 --- a/qemu/hw/device-assignment.c +++ b/qemu/hw/device-assignment.c @@ -157,12 +157,9 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num, region->e_physbase = e_phys; region->e_size = e_size; - if (!first_map) { - int slot = get_slot(old_ephys); - if (slot != -1) - kvm_destroy_phys_mem(kvm_context, old_ephys, - TARGET_PAGE_ALIGN(old_esize)); - } + if (!first_map) + kvm_destroy_phys_mem(kvm_context, old_ephys, + TARGET_PAGE_ALIGN(old_esize)); if (e_size > 0) ret = kvm_register_phys_mem(kvm_context, e_phys,
get_slot() isn't exported by libkvm, so we shouldn't be using it. The worst thing that can happen because of this change is that libkvm will spew a warning. It looks to me like that can't happen though. Fixes: qemu/hw/device-assignment.c:161: warning: implicit declaration of function ‘get_slot’ Signed-off-by: Mark McLoughlin <markmc@redhat.com> --- qemu/hw/device-assignment.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)