Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp270398imm; Tue, 16 Oct 2018 23:04:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV63aBzHpDHpIYflDngh3yPxoLoiNq5HaS/oKG+UEK0VoF10vgYYAe1pJNcpvhVapX6oAHYgL X-Received: by 2002:a62:d110:: with SMTP id z16-v6mr25795444pfg.229.1539756268653; Tue, 16 Oct 2018 23:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539756268; cv=none; d=google.com; s=arc-20160816; b=nQOU5HjKxAkr81ixLbzHxYSnVJgUnjpkAVHl8ReoQbHgpj2NVchplwliIAUNXrjYCl mTaufjnRKhrBCSYamJ8ofT2BSAX3AHiXDlGYiHlMbEg7KmKmujI3IB4ZsQ/YOLXkngw7 SogzQ4utcaDkyZgKyM4dXG0vyT4DLusBMIgWx6uDliybKfZ6U0Sgy8cVS3lpwwW/TLR1 qmcixtteDXgn0nAHXHC4ZlvfDIccHLCCFkwzYItsjoMeuVE0bF8LPPPXni2jbvmnXAYt mc+LLvBrH5KgPN6sXL6/o66aDozsxxTzY9S1+KiJREYgn58ngFNp3Cb5+I4pHCX6xqPD XymA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RbTVT/zYvpQ9SEC1HNt9MSqZUZ8u14s6yZ3GVbd73yQ=; b=xXlkICoh69ipX+j6Hg3w8PmGdFRH5ld6LypDDIV8MKzX/CLIx4T/RwyYNDThVzmoR7 RoBeLP4gk6d8oPpzxw5klsdx6D27oLS9OGJ/gUHV5Ly/NC1TEkAZiEu/zTZSNxtnI//j jNqB14ifkgms6TvvQ/x0S/0soy6X4SmchSfkqA/W6uAxL8KHNPzJhin5mplqWwA7RtOV pIny/kOBR0OfNtQq5iWtA5/B0xMnUT8fcRyo+wmWf7q8xtzCmkHUdkXfUYW68mgmV4Hk 23FfyMHOga1HPm0TCSiMuhE7C5dn9hWHzpiU0/jR3VCns37YknSdbJLRjtqURa1fgOOB S7GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PoE0bsaU; 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=fail (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 d126-v6si15826469pgc.189.2018.10.16.23.04.13; Tue, 16 Oct 2018 23:04:28 -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=fail header.i=@gmail.com header.s=20161025 header.b=PoE0bsaU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbeJQNz4 (ORCPT + 99 others); Wed, 17 Oct 2018 09:55:56 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53249 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726429AbeJQNz4 (ORCPT ); Wed, 17 Oct 2018 09:55:56 -0400 Received: by mail-wm1-f67.google.com with SMTP id y11-v6so682656wma.3; Tue, 16 Oct 2018 23:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=RbTVT/zYvpQ9SEC1HNt9MSqZUZ8u14s6yZ3GVbd73yQ=; b=PoE0bsaU7dQtlxI+OnySxUU07CoI6VSQbXCMeeQDV0jDszJKhJPQTrFxjY1X66/QZD wqZa/tSlt3/Pvdm9cXSCvf+7N60BVK3uZdA6Brz0SKCLnCLTs7S/bIoLrE+B0oXNtSm5 fte7J2dcxJo+LXYTL2ccJ7Y83+xgQi2nwkPxkoSdVN7/eTTq5ctq1YzSynBcspwdu+uD mmxBeZNaNRwwEW+lZKCMsTrGiExyAI0aL9hBIICSt9Xf8GX972HxAg6SNbOLxcTxEyE1 KgwAu3/eht1zTsImXvyDGGGP6+DVKoyJE4xyNOOSNjNnI08dcc47TXlVLl3EHG+6DvfB u9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=RbTVT/zYvpQ9SEC1HNt9MSqZUZ8u14s6yZ3GVbd73yQ=; b=cm7i2zDp6IL/+LetoGzG1FY8gBE3PUpSkDoFJOACQNBP7pAEly5nkfqUOU45vxAnsb J5dhJ7joGO8e2kw5YFCvZ5YgNnfUjixgylEJtaaa0AnA+YScFj2oPvxhaBIbpqcWB35Z xFi3lvokQqW9rt8xBkCcM1qH4VWOCalViK+LIm3xY8JX6yLQUvVMSLc3L0yqIeBmdUq1 6tcXPIVwdKzHW/m6kaeaRocm8+2UeGi1FnRf4Xcy0fxEZ79SAroWBXcI17Z1Hda7l/po ARejfBR5GbF9L6gNqbjDUzYqPSnlZmi9Qji6MwvcaHNBgB/xnSkv21W56Z0UF9OLswvk hLwg== X-Gm-Message-State: ABuFfogMUByjmFtnCICfqcoHqlxaqovaBrGcszmXFcd2oVlebL9PJYIf K/2dZLioqQ5hJtCs2We5TKM= X-Received: by 2002:a1c:e583:: with SMTP id c125-v6mr1316513wmh.134.1539756114255; Tue, 16 Oct 2018 23:01:54 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id t13-v6sm9450232wrn.22.2018.10.16.23.01.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Oct 2018 23:01:53 -0700 (PDT) Date: Wed, 17 Oct 2018 08:01:51 +0200 From: Ingo Molnar To: Leonardo =?iso-8859-1?Q?Br=E1s?= Cc: lkcamp@lists.libreplanetbr.org, Matthew Wilcox , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 2/4] Renames variable to fix shadow warning. Message-ID: <20181017060151.GA1105@gmail.com> References: <20181017000834.GA21330@WindFlash> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181017000834.GA21330@WindFlash> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Leonardo Br?s wrote: > Renames the char variable to avoid shadowing a variable previously > declared on this function. > > Signed-off-by: Leonardo Br?s > --- > 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 ... Thanks, Ingo