diff options
author | Jiang Biao <jiang.biao2@zte.com.cn> | 2016-11-06 19:55:49 -0500 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-11-16 16:09:44 -0500 |
commit | 1e13175bd2b608ce1f94ef84f54dfac0d7288241 (patch) | |
tree | d2abe2ce9e96ffd7c7a7cc182df69346efc0fd9e | |
parent | ae6a237560dccd1d2e3191b7365bc19ae654ff91 (diff) |
kvm: x86: cpuid: remove the unnecessary variable
The use of local variable *function* is not necessary here. Remove
it to avoid compiling warning with -Wunused-but-set-variable option.
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/cpuid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index afa7bbb596cd..568041397581 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c | |||
@@ -865,9 +865,9 @@ EXPORT_SYMBOL_GPL(kvm_cpuid); | |||
865 | 865 | ||
866 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | 866 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) |
867 | { | 867 | { |
868 | u32 function, eax, ebx, ecx, edx; | 868 | u32 eax, ebx, ecx, edx; |
869 | 869 | ||
870 | function = eax = kvm_register_read(vcpu, VCPU_REGS_RAX); | 870 | eax = kvm_register_read(vcpu, VCPU_REGS_RAX); |
871 | ecx = kvm_register_read(vcpu, VCPU_REGS_RCX); | 871 | ecx = kvm_register_read(vcpu, VCPU_REGS_RCX); |
872 | kvm_cpuid(vcpu, &eax, &ebx, &ecx, &edx); | 872 | kvm_cpuid(vcpu, &eax, &ebx, &ecx, &edx); |
873 | kvm_register_write(vcpu, VCPU_REGS_RAX, eax); | 873 | kvm_register_write(vcpu, VCPU_REGS_RAX, eax); |