From 9f11f8ab76b499943cea18dc667f84d630c9b153 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 15 Jan 2009 13:47:30 +0000 Subject: [PATCH] Device-assignment: don't use libkvm's private get_slot() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Avi Kivity --- hw/device-assignment.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index d5eb7b214c..f8faf5b714 100644 --- a/hw/device-assignment.c +++ b/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, -- 2.11.4.GIT