From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Date: Thu, 15 Jan 2009 13:47:31 +0000 Message-ID: <1232027262-21487-7-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> <1232027262-21487-6-git-send-email-markmc@redhat.com> Cc: kvm@vger.kernel.org, Mark McLoughlin To: avi@redhat.com Return-path: Received: from mail08.svc.cra.dublin.eircom.net ([159.134.118.24]:46731 "HELO mail08.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758505AbZAONrp (ORCPT ); Thu, 15 Jan 2009 08:47:45 -0500 In-Reply-To: <1232027262-21487-6-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Mark McLoughlin --- libkvm/kvm-common.h | 8 -------- libkvm/libkvm.c | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h index c5beacc..00fb16d 100644 --- a/libkvm/kvm-common.h +++ b/libkvm/kvm-common.h @@ -63,14 +63,6 @@ struct kvm_context { int coalesced_mmio; }; -void init_slots(void); -int get_free_slot(kvm_context_t kvm); -void register_slot(int slot, unsigned long phys_addr, unsigned long len, - unsigned long userspace_addr, unsigned flags); - -void free_slot(int slot); -int get_slot(unsigned long phys_addr); - int kvm_alloc_kernel_memory(kvm_context_t kvm, unsigned long memory, void **vm_mem); int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory, diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 0408fdb..a0c7be2 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -75,7 +75,7 @@ struct slot_info { struct slot_info slots[KVM_MAX_NUM_MEM_REGIONS]; -void init_slots(void) +static void init_slots(void) { int i; @@ -83,7 +83,7 @@ void init_slots(void) slots[i].len = 0; } -int get_free_slot(kvm_context_t kvm) +static int get_free_slot(kvm_context_t kvm) { int i; int tss_ext; @@ -110,7 +110,7 @@ int get_free_slot(kvm_context_t kvm) return -1; } -void register_slot(int slot, unsigned long phys_addr, unsigned long len, +static void register_slot(int slot, unsigned long phys_addr, unsigned long len, unsigned long userspace_addr, unsigned flags) { slots[slot].phys_addr = phys_addr; @@ -119,13 +119,13 @@ void register_slot(int slot, unsigned long phys_addr, unsigned long len, slots[slot].flags = flags; } -void free_slot(int slot) +static void free_slot(int slot) { slots[slot].len = 0; slots[slot].logging_count = 0; } -int get_slot(unsigned long phys_addr) +static int get_slot(unsigned long phys_addr) { int i; @@ -139,7 +139,7 @@ int get_slot(unsigned long phys_addr) /* Returns -1 if this slot is not totally contained on any other, * and the number of the slot otherwise */ -int get_container_slot(uint64_t phys_addr, unsigned long size) +static int get_container_slot(uint64_t phys_addr, unsigned long size) { int i; -- 1.6.0.6