From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Qian Cai <quic_qiancai@quicinc.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm: Avoid shadowing a local in search_memslots()
Date: Tue, 26 Oct 2021 16:39:42 +0000 [thread overview]
Message-ID: <YXgvTnhVWZ0gJdFs@google.com> (raw)
In-Reply-To: <7e3fb7c6-265c-d245-dd97-24ab401a8ea3@redhat.com>
On Tue, Oct 26, 2021, Paolo Bonzini wrote:
> On 26/10/21 18:14, Qian Cai wrote:
> > > Maybe "pivot"? Or just "tmp"? I also vote to hoist the declaration out of the
> > > loop precisely to avoid potential shadows, and to also associate the variable
> > > with the "start" and "end" variables, e.g.
> > Actually, I am a bit more prefer to keep the declaration inside the loop
> > as it makes the declaration and assignment closer to make it easier to
> > understand the code. It should be relatively trivial to avoid potential
> > shadows in the future. It would be interesting to see what Paolo would say.
>
> You both have good arguments, so whoever writes the patch wins. :)
LOL, KVM's version of Thunderdome.
prev parent reply other threads:[~2021-10-26 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 15:13 [PATCH] kvm: Avoid shadowing a local in search_memslots() Qian Cai
2021-10-26 15:44 ` Sean Christopherson
2021-10-26 15:57 ` Qian Cai
2021-10-26 16:14 ` Qian Cai
2021-10-26 16:18 ` Paolo Bonzini
2021-10-26 16:39 ` Sean Christopherson [this message]
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=YXgvTnhVWZ0gJdFs@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=quic_qiancai@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox