From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Date: Thu, 15 Jan 2009 13:47:30 +0000 Message-ID: <1232027262-21487-6-git-send-email-markmc@redhat.com> References: <1232027262-21487-1-git-send-email-markmc@redhat.com> <1232027262-21487-2-git-send-email-markmc@redhat.com> <1232027262-21487-3-git-send-email-markmc@redhat.com> <1232027262-21487-4-git-send-email-markmc@redhat.com> <1232027262-21487-5-git-send-email-markmc@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Mark McLoughlin To: avi@redhat.com Return-path: Received: from mail09.svc.cra.dublin.eircom.net ([159.134.118.25]:31753 "HELO mail09.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758009AbZAONrp (ORCPT ); Thu, 15 Jan 2009 08:47:45 -0500 In-Reply-To: <1232027262-21487-5-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. =46ixes: qemu/hw/device-assignment.c:161: warning: implicit declaration of fun= ction =E2=80=98get_slot=E2=80=99 Signed-off-by: Mark McLoughlin --- 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 =3D e_phys; region->e_size =3D e_size; =20 - if (!first_map) { - int slot =3D get_slot(old_ephys); - if (slot !=3D -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)); =20 if (e_size > 0) ret =3D kvm_register_phys_mem(kvm_context, e_phys, --=20 1.6.0.6