All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Peng Hao <flyingpenghao@gmail.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] KVM:VMX:Remove scratch 'cpu' variable that shadows an identical scratch var
Date: Tue, 22 Feb 2022 15:16:59 +0000	[thread overview]
Message-ID: <YhT+a4I0ytA7eVE5@google.com> (raw)
In-Reply-To: <20220222103954.70062-1-flyingpeng@tencent.com>

Needs a space between "KVM:" and "VMX:".  No need to resend, Paolo can fixup when
applying.

On Tue, Feb 22, 2022, Peng Hao wrote:
>  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>
> ---
>  arch/x86/kvm/vmx/vmx.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index ba66c171d951..6101c2980a9c 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -7931,7 +7931,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) {
> -- 
> 2.27.0
> 

  reply	other threads:[~2022-02-22 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 10:39 [PATCH v2] KVM:VMX:Remove scratch 'cpu' variable that shadows an identical scratch var Peng Hao
2022-02-22 15:16 ` Sean Christopherson [this message]
2022-02-24 14:24 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YhT+a4I0ytA7eVE5@google.com \
    --to=seanjc@google.com \
    --cc=flyingpenghao@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.