Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp957991imm; Wed, 17 Oct 2018 10:55:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV631P53fX+LvgnE/hbTHgaIuqtN3BS3C39oo6lThlHqYsgnUSl1MVRxi2t4H1aMow9HB4CW5 X-Received: by 2002:a63:d60a:: with SMTP id q10-v6mr24985244pgg.175.1539798927800; Wed, 17 Oct 2018 10:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539798927; cv=none; d=google.com; s=arc-20160816; b=l3iKSBAmmpv8de1pXcyET2LxzAFhUoBBLFP0k5Ult2aklaZtL2jIqIlc6+E3iy11ji ADSDrMJy10+x/9wUUFHHCMp7ry44BGn/RoRczWdSNx3uIEV1QAfU0o8f1WaTK6RA1F/V N4NvbK9kS4GjiI7p9+s3LXlWdijrM4PdGaGczQvsmT4F5eGCbnPHH1ckKcEGHr5dFbPK /wLhtPDIdbr7UzUoNk3/rdgAoYAUmoz1uN7wSh7bn1uiWvZlrl31VNwgqL4fhl5rg5F3 X4jPKyE5N8nVDQfLKs7AVMlPbMb2xndq3m+93kLHZp7qOsCpcPBYiTNuhBeOesoM++qN zGKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pfcU7nE5P0ibw+TXkIGZ8FbSl4bVHISFJErR1W8dO0c=; b=QcfnHRF0rj7DJVn0KTuWRJ0Qmf2ZYvB+xo7Eutcr8vNKGGVuOO0HwLH46ZFo/4xkxJ WqyM9Wj0yjDKvj9XeNWjXsw0kpklkxKiq8Ws9tK6ux9QELgSznZCP28VZdd62nbxKAFQ SgFnqibkyalu+CWQ7eczcTuuTvJHHFM2Nxk9VMHEP9CTr1VF/wPW/bohX5h5dC0QVCZX hMCa2y9JIsJDsqCDjOXEFavdGwaLunewwbJnOqDw6UyKPdNfxVmXS4pLt7OwVU3uy9Wm E9xvarfqimmImyBOlihzeKSLv0fIVcygy12wsohFHZ1do6HaoIToW9FX+yFrcSdxxw7M aJzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tJ4CEmR0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si16853111pfo.189.2018.10.17.10.55.11; Wed, 17 Oct 2018 10:55:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tJ4CEmR0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727773AbeJRBv3 (ORCPT + 99 others); Wed, 17 Oct 2018 21:51:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727330AbeJRBv2 (ORCPT ); Wed, 17 Oct 2018 21:51:28 -0400 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A7112151D for ; Wed, 17 Oct 2018 17:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539798881; bh=V2RHBNJES4Csa6KWpY1VN8nn1Ru8+U0/UrnfIs3j+Y4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tJ4CEmR0I+j8dBARJYuT95uN0aRPNI8J88wmIMwBKO8skFQFWJPe5g6YgCuLVm3X5 ESBOWqbmlL1VM33qUOVfRJBx/E2kUkF90Sm0H73o/beGbB+88lXYOaobo58FUgUw4c VqU/cmTD2wSY04fiheo0TMgx9YZjntS1e3Db0dJs= Received: by mail-wm1-f51.google.com with SMTP id z25-v6so125451wmf.1 for ; Wed, 17 Oct 2018 10:54:41 -0700 (PDT) X-Gm-Message-State: ABuFfohtLYHTekV+AYsBp5CxH4zYqh5Lbckt+ACexOkiIu3E5aLXesyf iffknUvaOXkgnTcon7mzZzllrA/7CavlBVfn96QPpQ== X-Received: by 2002:a1c:f312:: with SMTP id q18-v6mr3868002wmq.14.1539798879668; Wed, 17 Oct 2018 10:54:39 -0700 (PDT) MIME-Version: 1.0 References: <20181017000834.GA21330@WindFlash> <20181017060151.GA1105@gmail.com> In-Reply-To: <20181017060151.GA1105@gmail.com> From: Andy Lutomirski Date: Wed, 17 Oct 2018 10:54:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] Renames variable to fix shadow warning. To: Ingo Molnar Cc: leobras.c@gmail.com, lkcamp@lists.libreplanetbr.org, Matthew Wilcox , Andrew Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , Masahiro Yamada , michal.lkml@markovi.net, LKML , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 11:01 PM Ingo Molnar wrote: > > > * Leonardo Br=C3=A1s wrote: > > > Renames the char variable to avoid shadowing a variable previously > > declared on this function. > > > > Signed-off-by: Leonardo Br=C3=A1s > > --- > > 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 =3D raw_addr + GET_LE(&symtab_hdr->sh_offse= t) + > > GET_LE(&symtab_hdr->sh_entsize) * i; > > - const char *name =3D raw_addr + GET_LE(&strtab_hdr->sh_of= fset) + > > + const char *name2 =3D raw_addr + GET_LE(&strtab_hdr->sh_o= ffset) + > > GET_LE(&sym->st_name); > > > > for (k =3D 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 ... > Maybe image_name and sym_name? --Andy