From patchwork Thu Jan 15 13:47:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 2489 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0FDhmOG020391 for ; Thu, 15 Jan 2009 05:43:50 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759324AbZAONr5 (ORCPT ); Thu, 15 Jan 2009 08:47:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761333AbZAONr5 (ORCPT ); Thu, 15 Jan 2009 08:47:57 -0500 Received: from mail06.svc.cra.dublin.eircom.net ([159.134.118.22]:35786 "HELO mail06.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1759324AbZAONrp (ORCPT ); Thu, 15 Jan 2009 08:47:45 -0500 Received: (qmail 6642 messnum 12481977 invoked from network[83.71.77.218/83-71-77-218-dynamic.b-ras1.srl.dublin.eircom.net]); 15 Jan 2009 13:47:43 -0000 Received: from 83-71-77-218-dynamic.b-ras1.srl.dublin.eircom.net (HELO blaa.localdomain) (83.71.77.218) by mail06.svc.cra.dublin.eircom.net (qp 6642) with SMTP; 15 Jan 2009 13:47:43 -0000 Received: by blaa.localdomain (Postfix, from userid 500) id AEE8E2E4128; Thu, 15 Jan 2009 13:47:42 +0000 (GMT) From: Mark McLoughlin To: avi@redhat.com Cc: kvm@vger.kernel.org, Mark McLoughlin Subject: [PATCH 03/18] kvm: qemu: kill some redundant declarations Date: Thu, 15 Jan 2009 13:47:27 +0000 Message-Id: <1232027262-21487-3-git-send-email-markmc@redhat.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1232027262-21487-2-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> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fixes: qemu/vl.c:5295: warning: redundant redeclaration of ‘kvm_pit’ qemu/vl.c:5289: warning: previous declaration of ‘kvm_pit’ was here qemu/vl.c:5541: warning: redundant redeclaration of ‘kvm_allowed’ qemu/qemu-kvm.h:144: warning: previous declaration of ‘kvm_allowed’ was here qemu/qemu-kvm.h:144: warning: redundant redeclaration of ‘kvm_allowed’ qemu/qemu-kvm.c:11: warning: previous definition of ‘kvm_allowed’ was here qemu/qemu-kvm.h:145: warning: redundant redeclaration of ‘kvm_nested’ qemu/qemu-kvm.c:15: warning: previous definition of ‘kvm_nested’ was here qemu/kvm-tpr-opt.c:22: warning: redundant redeclaration of ‘kvm_context’ qemu/qemu-kvm.h:146: warning: previous declaration of ‘kvm_context’ was here qemu/qemu-kvm-x86.c:27: warning: redundant redeclaration of ‘kvm_context’ Signed-off-by: Mark McLoughlin --- qemu/kvm-tpr-opt.c | 2 -- qemu/qemu-kvm-x86.c | 1 - qemu/qemu-kvm.c | 11 +++++------ qemu/qemu-kvm.h | 3 +++ qemu/vl.c | 4 ---- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c index b3d26aa..3aaa8a4 100644 --- a/qemu/kvm-tpr-opt.c +++ b/qemu/kvm-tpr-opt.c @@ -19,8 +19,6 @@ #include -extern kvm_context_t kvm_context; - static uint64_t map_addr(struct kvm_sregs *sregs, target_ulong virt, unsigned *perms) { uint64_t mask = ((1ull << 48) - 1) & ~4095ull; diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 52ddd33..01748ed 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -24,7 +24,6 @@ static struct kvm_msr_list *kvm_msr_list; extern unsigned int kvm_shadow_memory; -extern kvm_context_t kvm_context; static int kvm_has_msr_star; static int lm_capable_kernel; diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index e4fba78..f4c92fb 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -8,12 +8,6 @@ #include "config.h" #include "config-host.h" -int kvm_allowed = 1; -int kvm_irqchip = 1; -int kvm_pit = 1; -int kvm_pit_reinject = 1; -int kvm_nested = 0; - #include #include #include "hw/hw.h" @@ -36,6 +30,11 @@ int kvm_nested = 0; extern void perror(const char *s); +int kvm_allowed = 1; +int kvm_irqchip = 1; +int kvm_pit = 1; +int kvm_pit_reinject = 1; +int kvm_nested = 0; kvm_context_t kvm_context; extern int smp_cpus; diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h index 12bd5a0..6e48662 100644 --- a/qemu/qemu-kvm.h +++ b/qemu/qemu-kvm.h @@ -142,6 +142,9 @@ int handle_powerpc_dcr_write(int vcpu,uint32_t dcrn, uint32_t data); #include "sys-queue.h" extern int kvm_allowed; +extern int kvm_irqchip; +extern int kvm_pit; +extern int kvm_pit_reinject; extern int kvm_nested; extern kvm_context_t kvm_context; diff --git a/qemu/vl.c b/qemu/vl.c index f2fe708..84a30fa 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -5286,18 +5286,15 @@ int main(int argc, char **argv, char **envp) kvm_allowed = 0; break; case QEMU_OPTION_no_kvm_irqchip: { - extern int kvm_irqchip, kvm_pit; kvm_irqchip = 0; kvm_pit = 0; break; } case QEMU_OPTION_no_kvm_pit: { - extern int kvm_pit; kvm_pit = 0; break; } case QEMU_OPTION_no_kvm_pit_reinjection: { - extern int kvm_pit_reinject; kvm_pit_reinject = 0; break; } @@ -5538,7 +5535,6 @@ int main(int argc, char **argv, char **envp) #if USE_KVM if (kvm_enabled()) { if (kvm_qemu_init() < 0) { - extern int kvm_allowed; fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); #ifdef NO_CPU_EMULATION fprintf(stderr, "Compiled with --disable-cpu-emulation, exiting.\n");