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 <[email protected]>
---
 qemu/hw/device-assignment.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

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,
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to