[PATCH] kvm: fix compile warnings on s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

  CC      arch/s390/kvm/../../../virt/kvm/kvm_main.o
arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
arch/s390/kvm/../../../virt/kvm/kvm_main.c:485: warning: unused variable 'j'
arch/s390/kvm/../../../virt/kvm/kvm_main.c:484: warning: unused variable 'lpages'
arch/s390/kvm/../../../virt/kvm/kvm_main.c:483: warning: unused variable 'ugfn'

Cc: Carsten Otte <cotte@xxxxxxxxxx>
Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---

Patch applies on top of linux-next.

 virt/kvm/kvm_main.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Index: linux-next/virt/kvm/kvm_main.c
===================================================================
--- linux-next.orig/virt/kvm/kvm_main.c
+++ linux-next/virt/kvm/kvm_main.c
@@ -480,9 +480,8 @@ int __kvm_set_memory_region(struct kvm *
 {
 	int r;
 	gfn_t base_gfn;
-	unsigned long npages, ugfn;
-	int lpages;
-	unsigned long i, j;
+	unsigned long npages;
+	unsigned long i;
 	struct kvm_memory_slot *memslot;
 	struct kvm_memory_slot old, new;
 
@@ -560,6 +559,9 @@ int __kvm_set_memory_region(struct kvm *
 		goto skip_lpage;
 
 	for (i = 0; i < KVM_NR_PAGE_SIZES - 1; ++i) {
+		unsigned long ugfn;
+		unsigned long j;
+		int lpages;
 		int level = i + 2;
 
 		/* Avoid unused variable warning if no large pages */
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux