public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Leonardo Bras <leobras.c@gmail.com>
Cc: lkcamp@lists.libreplanetbr.org,
	Matthew Wilcox <willy6545@gmail.com>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 2/4] Renames variable to fix shadow warning.
Date: Thu, 18 Oct 2018 07:47:18 +0200	[thread overview]
Message-ID: <20181018054718.GB62071@gmail.com> (raw)
In-Reply-To: <CADvQ+rHD5kAam7kOc2UBUd9Pw6QW3dGhUjQj=es37NfgMeLcyA@mail.gmail.com>


* Leonardo Bras <leobras.c@gmail.com> wrote:

> Thanks Ingo,
> On Wed, Oct 17, 2018 at 3:01 AM Ingo Molnar <mingo@kernel.org> wrote:
> >
> >
> > * Leonardo Brás <leobras.c@gmail.com> wrote:
> >
> > > Renames the char variable to avoid shadowing a variable previously
> > > declared on this function.
> > >
> > > Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
> > > ---
> > >  arch/x86/entry/vdso/vdso2c.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
> > > index fa847a620f40..9466998d0f28 100644
> > > --- a/arch/x86/entry/vdso/vdso2c.h
> > > +++ b/arch/x86/entry/vdso/vdso2c.h
> > > @@ -93,11 +93,11 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
> > >               int k;
> > >               ELF(Sym) *sym = raw_addr + GET_LE(&symtab_hdr->sh_offset) +
> > >                       GET_LE(&symtab_hdr->sh_entsize) * i;
> > > -             const char *name = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
> > > +             const char *name2 = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
> > >                       GET_LE(&sym->st_name);
> > >
> > >               for (k = 0; k < NSYMS; k++) {
> > > -                     if (!strcmp(name, required_syms[k].name)) {
> > > +                     if (!strcmp(name2, required_syms[k].name)) {
> > >                               if (syms[k]) {
> > >                                       fail("duplicate symbol %s\n",
> > >                                            required_syms[k].name);
> >
> > NAK.
> >
> > Please read and understand the code and rename both variables to
> > meaningful names, not just a mindless name/name2 ...
> >
> 
> It's changed! This change will be available on v2.

Thanks!

	Ingo

      reply	other threads:[~2018-10-18 13:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  0:08 [PATCH 2/4] Renames variable to fix shadow warning Leonardo Brás
2018-10-17  2:56 ` [Lkcamp] " Helen Koike
2018-10-17 23:10   ` Leonardo Bras
2018-10-17  6:01 ` Ingo Molnar
2018-10-17 17:54   ` Andy Lutomirski
2018-10-17 23:16     ` Leonardo Bras
2018-10-17 23:12   ` Leonardo Bras
2018-10-18  5:47     ` Ingo Molnar [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=20181018054718.GB62071@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=leobras.c@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkcamp@lists.libreplanetbr.org \
    --cc=luto@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=willy6545@gmail.com \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.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