All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH 03/18] kvm: qemu: kill some redundant declarations
Date: Thu, 15 Jan 2009 13:47:27 +0000	[thread overview]
Message-ID: <1232027262-21487-3-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1232027262-21487-2-git-send-email-markmc@redhat.com>

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 <markmc@redhat.com>
---
 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 <stdio.h>
 
-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 <assert.h>
 #include <string.h>
 #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");
-- 
1.6.0.6


  reply	other threads:[~2009-01-15 13:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 13:47 [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
2009-01-15 13:47   ` Mark McLoughlin [this message]
2009-01-15 13:47     ` [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static Mark McLoughlin
2009-01-15 13:47       ` [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls Mark McLoughlin
2009-01-15 13:47         ` [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Mark McLoughlin
2009-01-15 13:47           ` [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Mark McLoughlin
2009-01-15 13:47             ` [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype Mark McLoughlin
2009-01-15 13:47               ` [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype Mark McLoughlin
2009-01-15 13:47                 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
2009-01-15 13:47                   ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
2009-01-15 13:47                     ` [PATCH 12/18] kvm: qemu: kill redundant declarion of perror() Mark McLoughlin
2009-01-15 13:47                       ` [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running Mark McLoughlin
2009-01-15 13:47                         ` [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static Mark McLoughlin
2009-01-15 13:47                           ` [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu() Mark McLoughlin
2009-01-15 13:47                             ` [PATCH 16/18] kvm: qemu: make another couple of functions static Mark McLoughlin
2009-01-15 13:47                               ` [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration Mark McLoughlin
2009-01-15 13:47                                 ` [PATCH 18/18] kvm: qemu: kill unused variable in enable_vapic() Mark McLoughlin
2009-01-15 13:54                   ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
2009-01-15 14:24                     ` Mark McLoughlin
2009-01-15 14:35                       ` Avi Kivity
2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
2009-01-15 14:28   ` Mark McLoughlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232027262-21487-3-git-send-email-markmc@redhat.com \
    --to=markmc@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.