Skip to content

Commit

Permalink
KVM: fix compile warnings on s390
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
heicarst authored and avikivity committed Sep 10, 2009
1 parent 0a79b00 commit 28bcb11
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,9 +1091,8 @@ int __kvm_set_memory_region(struct kvm *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;

Expand Down Expand Up @@ -1171,6 +1170,9 @@ int __kvm_set_memory_region(struct kvm *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 */
Expand Down

0 comments on commit 28bcb11

Please sign in to comment.