Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338906 > unrolled thread

[PATCH] KVM: remove useless variable in kvm_emulate_cpuid()

Started byLong Peng <nimisolo@gmail.com>
First post2016-02-21 19:00 +0100
Last post2016-02-21 19:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] KVM: remove useless variable in kvm_emulate_cpuid() Long Peng <nimisolo@gmail.com> - 2016-02-21 19:00 +0100

#1338906 — [PATCH] KVM: remove useless variable in kvm_emulate_cpuid()

FromLong Peng <nimisolo@gmail.com>
Date2016-02-21 19:00 +0100
Subject[PATCH] KVM: remove useless variable in kvm_emulate_cpuid()
Message-ID<r4GsA-16v-47@gated-at.bofh.it>
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.

Signed-off-by: Long Peng <nimisolo@gmail.com>
---
 arch/x86/kvm/cpuid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 6525e92..be0ef88 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -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);
-- 
2.5.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web