summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPeng Hao <flyingpenghao@gmail.com>2022-02-22 18:39:54 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-25 08:20:13 -0500
commit0b8934d3a93ff3b89f7c2dbcc00de88cf5ae0d7e (patch)
tree695fd10b06eeff88478751111b062ac5036f70ab /arch
parent105e0c441aa4797e0240d3652ce8e69c6b308cb6 (diff)
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: Sean Christopherson <seanjc@google.com> Signed-off-by: Peng Hao <flyingpeng@tencent.com> Message-Id: <20220222103954.70062-1-flyingpeng@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx/vmx.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 7ceda4646f13..5285731fdab9 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -8129,7 +8129,6 @@ static int __init vmx_init(void)
ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED &&
(ms_hyperv.nested_features & HV_X64_ENLIGHTENED_VMCS_VERSION) >=
KVM_EVMCS_VERSION) {
- int cpu;
/* Check that we have assist pages on all online CPUs */
for_each_online_cpu(cpu) {