Skip to content

Commit

Permalink
KVM: fix build warning within __kvm_set_memory_region() on s390
Browse files Browse the repository at this point in the history
Get rid of this warning:

  CC      arch/s390/kvm/../../../virt/kvm/kvm_main.o
arch/s390/kvm/../../../virt/kvm/kvm_main.c:596:12: warning: 'kvm_create_dirty_bitmap' defined but not used

The only caller of the function is within a !CONFIG_S390 section, so add the
same ifdef around kvm_create_dirty_bitmap() as well.

Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
heicarst authored and matosatti committed Mar 17, 2011
1 parent 9ca5231 commit d48ead8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ static int kvm_vm_release(struct inode *inode, struct file *filp)
return 0;
}

#ifndef CONFIG_S390
/*
* Allocation size is twice as large as the actual dirty bitmap size.
* This makes it possible to do double buffering: see x86's
Expand All @@ -608,6 +609,7 @@ static int kvm_create_dirty_bitmap(struct kvm_memory_slot *memslot)
memslot->dirty_bitmap_head = memslot->dirty_bitmap;
return 0;
}
#endif /* !CONFIG_S390 */

/*
* Allocate some memory and give it an address in the guest physical address
Expand Down

0 comments on commit d48ead8

Please sign in to comment.