Commit 0b8934d3 authored by Peng Hao's avatar Peng Hao Committed by Paolo Bonzini

KVM: VMX: Remove scratch 'cpu' variable that shadows an identical scratch var

 From: Peng Hao <flyingpeng@tencent.com>

 Remove a redundant 'cpu' declaration from inside an if-statement that
 that shadows an identical declaration at function scope.  Both variables
 are used as scratch variables in for_each_*_cpu() loops, thus there's no
 harm in sharing a variable.
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPeng Hao <flyingpeng@tencent.com>
Message-Id: <20220222103954.70062-1-flyingpeng@tencent.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 105e0c44
...@@ -8129,7 +8129,6 @@ static int __init vmx_init(void) ...@@ -8129,7 +8129,6 @@ static int __init vmx_init(void)
ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED && ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED &&
(ms_hyperv.nested_features & HV_X64_ENLIGHTENED_VMCS_VERSION) >= (ms_hyperv.nested_features & HV_X64_ENLIGHTENED_VMCS_VERSION) >=
KVM_EVMCS_VERSION) { KVM_EVMCS_VERSION) {
int cpu;
/* Check that we have assist pages on all online CPUs */ /* Check that we have assist pages on all online CPUs */
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment