Skip to contentSkip to conversation

KVM: remove useless variable in kvm_emulate_cpuid()

PATCH New Long Peng 1 participant 1 message Feb 21, 2016

Subsystems (3)
lore
Share & tools
lore

Long Peng

author
#0 lore raw

PATCH 1/1 KVM: remove useless variable in kvm_emulate_cpuid()

Originally, this var('function') was used by trace_kvm_cpuid(), but the trace_kvm_cpuid() has moved into kvm_cpuid() . From then on, this var is useless, so we can remove it.

---
 arch/x86/kvm/cpuid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/cpuid.c +2 -2
index 6525e92..be0ef88 100644
@@ -836,9 +836,9 @@ EXPORT_SYMBOL_GPL(kvm_cpuid);
 
 void kvm_emulate_cpuid(struct kvm_vcpu *vcpu)
 {
-	u32 function, eax, ebx, ecx, edx;
+	u32 eax, ebx, ecx, edx;
 
-	function = eax = kvm_register_read(vcpu, VCPU_REGS_RAX);
+	eax = kvm_register_read(vcpu, VCPU_REGS_RAX);
 	ecx = kvm_register_read(vcpu, VCPU_REGS_RCX);
 	kvm_cpuid(vcpu, &eax, &ebx, &ecx, &edx);
 	kvm_register_write(vcpu, VCPU_REGS_RAX, eax);
Signature · 1 line
2.5.0