]> git.baikalelectronics.ru Git - kernel.git/commit
x86: kvm: hide the unused 'cpu' variable
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Apr 2018 10:44:14 +0000 (12:44 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Apr 2018 16:57:40 +0000 (18:57 +0200)
commit3e1b1b7a991038dd9a1f00e3465f601c9018d2b2
treec4a73c5de76d4ce0bd459fe9ae61ca63687e971e
parent3db9ae87bf8c560c04852ec7caf685e64701081f
x86: kvm: hide the unused 'cpu' variable

The local variable was newly introduced but is only accessed in one
place on x86_64, but not on 32-bit:

arch/x86/kvm/vmx.c: In function 'vmx_save_host_state':
arch/x86/kvm/vmx.c:2175:6: error: unused variable 'cpu' [-Werror=unused-variable]

This puts it into another #ifdef.

Fixes: d2e77a6964e8 ("x86/kvm/vmx: avoid expensive rdmsr for MSR_GS_BASE")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c