diff options
author | Jiang Biao <jiang.biao2@zte.com.cn> | 2016-11-07 08:55:49 +0800 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-11-16 22:09:44 +0100 |
commit | 1e13175bd2b608ce1f94ef84f54dfac0d7288241 (patch) | |
tree | d2abe2ce9e96ffd7c7a7cc182df69346efc0fd9e /arch/x86/kvm/cpuid.c | |
parent | ae6a237560dccd1d2e3191b7365bc19ae654ff91 (diff) | |
download | linux-1e13175bd2b608ce1f94ef84f54dfac0d7288241.tar.bz2 |
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>
Diffstat (limited to 'arch/x86/kvm/cpuid.c')
-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); 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); |