]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Remove scratch 'cpu' variable that shadows an identical scratch var
authorPeng Hao <flyingpenghao@gmail.com>
Tue, 22 Feb 2022 10:39:54 +0000 (18:39 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:13 +0000 (08:20 -0500)
commita1cce3580e9afde0ea9a446717cd4d76eb6b9bdd
tree695fd10b06eeff88478751111b062ac5036f70ab
parent3d757f827a5bd53d61819e31bb0b191e42d8c6f7
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>
arch/x86/kvm/vmx/vmx.c