Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1241513imm; Wed, 17 Oct 2018 16:13:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV63tHhzcOz5Dm1ePIhHfQw2UiYzqBLm2AoXQNuMQWxBS3B5i/nRqXzPFVxqTPweXfuEA8pt+ X-Received: by 2002:a62:8685:: with SMTP id x127-v6mr4863860pfd.252.1539817992864; Wed, 17 Oct 2018 16:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539817992; cv=none; d=google.com; s=arc-20160816; b=vejqKdwaI9kCM38KiVk7luLHa8flidvlVPlm97dfcejQBxeZtLO1ETLi2kW7hQbPzT r4gPWOw2YAx6ysEevsTvvg/mch0kTBhG00JueG3GKCZZYZX55iTW/NYqk1kV1cOGcpMx ycAP1DYh1ETvOV4E1/hW8QS4St+Q/nwrds5KbiSv8b8cNa9rqGfKbcPnq/tOM0M5Teu4 kw7KhVJMStP7M48YVBTwbwnN4xN4WaNHALapMANSrcN8PdTNQj9svE+uiGLCqWfe/wGW 80Iqw/N4XUuXr8w1P6HbuIIg++KMy8C2Z/+dQetzxEQkt2JHIID86yedUu8Q4w13Bxgk Cq4g== 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=9BDvSY048GN7d+7lYH/dmV+sc0UMWzZ0Ep2qtlKMfu8=; b=qovKYbT+im2FwF6SXpQwokM7I1aRFh6aB3crdQVFKA1fwotGMyCL8/IFbvyy7VmK4T mnl+61QNjdQeJuL6tbNPIizuv8QSXZxH6+AY0ZMcE5YEaWdmR/eQ2Tv2EdpC4QZcORM8 zPeBiutdCT+azE6P62+/7VE36uvBIUN3gC/0SjYx0Fdl+plfDwyvMMiGODFxsgxVyyFA /9Khyu/O42xV2lAMfFD4bWCjfAwIV3O7Oit+b5+C8K1wUpG/xOZlBHtgNdQXhOKrsqP6 j/wXkk0puzalZXxA0Jj3rjLMv2wBH2OxalrZth+kH7irJd3uvH2SdfAaSyYbxJ+2yLkz hPNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OkG325KN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12-v6si17871986plt.115.2018.10.17.16.12.57; Wed, 17 Oct 2018 16:13:12 -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=@gmail.com header.s=20161025 header.b=OkG325KN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727503AbeJRHJB (ORCPT + 99 others); Thu, 18 Oct 2018 03:09:01 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:35695 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726853AbeJRHJB (ORCPT ); Thu, 18 Oct 2018 03:09:01 -0400 Received: by mail-ot1-f67.google.com with SMTP id 14so23952286oth.2; Wed, 17 Oct 2018 16:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9BDvSY048GN7d+7lYH/dmV+sc0UMWzZ0Ep2qtlKMfu8=; b=OkG325KNR5XS79/vhwrGgMXAuvbu/gsBRgSwAccmsTpORsFdsJH7Du4ubEnki0Fs44 rchdYTf7tBJ9iz7wWEHXh+lke9Rn8Hx6tChJbMTBYQ7EDBR7sb9yd9vOi9JrsHXWp3Eu SvtdzGNsm0OKw7qZ/W3FmNbJo9pzGu+fP2DpHrlNxJNg7trZxDdkKgZcwW3fJv8HG+ou rAVmgQteUYuDkm13HFC0b6R7XDFPg1ddqPg/f0fPPtIwvVrLMG3kvroC2B+PFpIYfyoW N9TuGyeV17qEcea3F+DCUnmJjuidkagSFcVKDpzePwpS54Mp2sSW7KaZRuMEB30qjjFP V7mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9BDvSY048GN7d+7lYH/dmV+sc0UMWzZ0Ep2qtlKMfu8=; b=JXZ5037m6dxtC+UBtYNpaIaTgWu0bQp56zatHLz9o7Ki0WsYlgpo9MAWnjQnJin6G7 y7rUPBzBvs5K0tb4s0WRbS7eicyeDmFEBWr21o/fr+LhUwpPXIY7AQ59sQpszhT8Mlki myE9fMpqcB/VmBpkLwW93MvKCt+yV0NeWFg+glCKNW/bYto6yz+eFdkChZxv1bTfgc41 EniSBQvroKlt7906CJ4oOoVxpGdxPHjmeoAsVVg1+6Oz6b/v0xw/1GA8a4V6ho/UutBq ZaywhF5gmgZYmG//t04zjbx+6WGqMXB6PBQlfsSCidQp6ZvoZtELggIIW9Jq8fxCMF94 Wu+Q== X-Gm-Message-State: ABuFfohp1N5OosVogIqu/UUhmNgWy13RNk1IWKtDKsYEJLq74Eu1Uivn oKyF+f/Fuk6lblKY/IkjEBlpp2o/G9NvzhtV3x8= X-Received: by 2002:a9d:948:: with SMTP id 66mr18392857otp.178.1539817862758; Wed, 17 Oct 2018 16:11:02 -0700 (PDT) MIME-Version: 1.0 References: <20181017000834.GA21330@WindFlash> In-Reply-To: From: Leonardo Bras Date: Wed, 17 Oct 2018 20:10:50 -0300 Message-ID: Subject: Re: [Lkcamp] [PATCH 2/4] Renames variable to fix shadow warning. To: helen@koikeco.de Cc: lkcamp@lists.libreplanetbr.org, x86@kernel.org, linux-kbuild@vger.kernel.org, Matthew Wilcox , linux-kernel , Masahiro Yamada , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Michal Marek , Thomas Gleixner 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 Hello Helen, Thanks for the suggestions! On Tue, Oct 16, 2018 at 11:57 PM Helen Koike wrote: > > Hi Leonardo, > > Thanks for the patch, just some small comments below. > > Please, check previous log messages with git log > arch/x86/entry/vdso/vdso2c.h, you will see that most patches had the > prefix "x86/vdso:" in the commit message. Ok, added! This change will be available on v2. > > On 10/16/18 9:08 PM, 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); > > Could you please use a more meaningful name instead of name2 please? I > believe sym_name should be fine. Ok, I renamed as you suggested. Also, I renamed the "name" variable to "image_name" as Andy suggested. This change will be available on v2. > > > > > 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); > > > > Regards > Helen Regards, Leonardo Bras