[PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()

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

 



The variable 'type' in split_page_type() is set but not used, so remove
it.

Fixes the following w1 warning:

arch/x86/kvm/mmu/mmu.c:982:28: warning: variable 'type' set but not used [-Wunused-but-set-variable]

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: sunliming <sunliming@xxxxxxxxxx>
---
 arch/x86/kvm/mmu/mmu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 7b3df91a93cf..f4d577335f94 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -979,14 +979,12 @@ static void split_page_type(gfn_t gfn, struct kvm_memory_slot *slot,
 			    enum pg_level level)
 {
 	struct kvm_page_attr *page_attr = page_attr_slot(gfn, slot, level);
-	enum kvm_page_type type;
 	gfn_t base_gfn;
 
 	if (WARN_ON_ONCE(!kvm_page_type_valid(page_attr) || level <= PG_LEVEL_4K))
 		return;
 
 	base_gfn = gfn & ~(KVM_PAGES_PER_HPAGE(level) - 1);
-	type = page_attr->type;
 
 	/*
 	 * Set the type to KVM_PAGE_TYPE_MIXED in advance since when a large
-- 
2.25.1




[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