Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2870286ima; Mon, 22 Oct 2018 18:11:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV60yAS7UGljcdEuYM2iiOVw5RQ8QBwa5TkmNAB1xZoHXE2jR7Mr2PTUiD4mcJx2Vb7wB+Wn9 X-Received: by 2002:a63:9f0a:: with SMTP id g10-v6mr42903387pge.232.1540257067488; Mon, 22 Oct 2018 18:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540257067; cv=none; d=google.com; s=arc-20160816; b=PTbfT+tRfgYAlTWLGUyPA79tgDF7PP9KIP9fvJ9lNleRMfiIobN2ls3Mv4IHh+u4ho jXDZAiv6sVexgXAEMBqrC9TL7lT2eWBLQXTKNYgoTNzKqIAueVXTZdZN63k708Csy2n5 Ys54XbL9dNtsTy3LXl8H0eVcqqsvLuNq+nb472cdNH0j8zZAy6wojUvTC2GeWoutsP7n hnhz3ceVYr6WzIT/OHqXpSxHVfD2metLZuwK5iJLyuCclUa2UzyBXlgD5eXGJxNPbnxV 0070PuSmyjBGZt+HcWlw4jSxrPmvjMmgkv3d/5gRIOziAleBdOV+Wv6wY2rv75gAZ9ZP JKnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=reoZw2EkBU8/NGU6BCm+2JztCf8UNgy8iBR4BKrH64U=; b=Z2DymE1v3qLXOByl3/CcTOQWhDtLLHgSGZT6mRKwqxSYS6o0gCTfpUMLRyCmg0vqrx 28d3nxjNalgOo9mSFmWGGm63f5wrujHskZoflHe1WpU0E1emR5JT9RLo9aWHV7b5XdtY GLoqgHPhZUurvrcqiULrXOwEdUtpDBQAFTxGInIFparczQG6eRVVVMEfoaNVzi/mk9BK xK2pIBDyPFUCeK4AsOfqTQUw9WUPNisrgYfAbST10Q/rKpk3nZmva9KqTmLZTH0x0QEf 67I4VktZusmi++Ii+TqnpRPxCWhkblmFPU4cxuuyG9GlGG9xVugR/QhSTn/25uPsX6XE mD5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EA/j+LYB"; 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 c1-v6si35775180pld.107.2018.10.22.18.10.51; Mon, 22 Oct 2018 18:11:07 -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="EA/j+LYB"; 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 S1727089AbeJWJb3 (ORCPT + 99 others); Tue, 23 Oct 2018 05:31:29 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:35613 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeJWJb3 (ORCPT ); Tue, 23 Oct 2018 05:31:29 -0400 Received: by mail-qk1-f196.google.com with SMTP id v68-v6so26656971qka.2; Mon, 22 Oct 2018 18:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=reoZw2EkBU8/NGU6BCm+2JztCf8UNgy8iBR4BKrH64U=; b=EA/j+LYBkM+RBFZU5keaLDcsqOpcchNN/uKTn8MEvNJ/RcrESKtM8A8TMSRltoGlRs 0AEr4IU0cR3CelZZaPsUcrVqZoLTyuCU4Ix32imUECzRp0hejG0krYen7Oqo/Yn0GQs6 Q9wTEjdD4DXZXpgOE/cfGlzZSn38yYY2xm/TDNPqGn6q6OFilHtUnP7mm9LBm0198/EF 0YKio5TzxSxhKPUm8iIl8uMSYZQLBGsptUUBH0jnwyyTqu7nVIus0HT5yq2sXMm2pCdm Yyb0ythWLxbkhwHs89kFXQUiQQW0caWModhJ9zklk0blbi0ryr/+BBxqA4tnNV2zypdv FrZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=reoZw2EkBU8/NGU6BCm+2JztCf8UNgy8iBR4BKrH64U=; b=o+qLFhr4Ivpp+LCw0MWtT0vDHrHL9m53Bu2bKnTNM8GxNxNJkKwXb9wo2umDZN/bfA xeyjgJjZnXjT8W4MlT5WRzMxS+nxFTMt3U9ElB2kN8XHFbmaKJsygvNBM5bqQvcIpQyN OIwzxtnRCLPm1yaLWFfwwNbfRoY07YybgbvhFAE7IqEGYnstRzMvw503NJJ7xmKAFdB3 EdT3/POZRq23mZE+s+mOif6dn6eOk2ppeg1S/nS8XKHFQaQg1+ClCIgBVS22c/hZyadO eqph4c4ij6jalDQ9lapoYoZ4PAVrTHq0suOWzvDdOFdapXt8GQCbwVtks1XO6Kb9tp2I TlVg== X-Gm-Message-State: AGRZ1gIRidKFmdK/Lz0sB4xu8ARbZV8LWlTqXH5ZZt+/DoxEiZq4470f 3j94gL7+YL+7IM3Dbqpl46Q= X-Received: by 2002:a37:d87:: with SMTP id 129-v6mr9625516qkn.212.1540257029355; Mon, 22 Oct 2018 18:10:29 -0700 (PDT) Received: from WindFlash ([179.159.21.48]) by smtp.gmail.com with ESMTPSA id 82-v6sm11379958qkg.16.2018.10.22.18.10.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Oct 2018 18:10:28 -0700 (PDT) Date: Mon, 22 Oct 2018 22:10:22 -0300 From: Leonardo =?utf-8?B?QnLDoXM=?= To: lkcamp@lists.libreplanetbr.org Cc: Borislav Petkov , David.Laight@aculab.com, Andy Lutomirski , Ingo Molnar , helen@koikeco.de, Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] x86/vdso: Renames variable to fix shadow warning. Message-ID: <20181023011022.GA6574@WindFlash> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h index fa847a620f40..a20b134de2a8 100644 --- a/arch/x86/entry/vdso/vdso2c.h +++ b/arch/x86/entry/vdso/vdso2c.h @@ -7,7 +7,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, void *stripped_addr, size_t stripped_len, - FILE *outfile, const char *name) + FILE *outfile, const char *image_name) { int found_load = 0; unsigned long load_size = -1; /* Work around bogus warning */ @@ -93,11 +93,12 @@ 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) + - GET_LE(&sym->st_name); + const char *sym_name = 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(sym_name, required_syms[k].name)) { if (syms[k]) { fail("duplicate symbol %s\n", required_syms[k].name); @@ -134,7 +135,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, if (syms[sym_vvar_start] % 4096) fail("vvar_begin must be a multiple of 4096\n"); - if (!name) { + if (!image_name) { fwrite(stripped_addr, stripped_len, 1, outfile); return; } @@ -157,7 +158,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, } fprintf(outfile, "\n};\n\n"); - fprintf(outfile, "const struct vdso_image %s = {\n", name); + fprintf(outfile, "const struct vdso_image %s = {\n", image_name); fprintf(outfile, "\t.data = raw_data,\n"); fprintf(outfile, "\t.size = %lu,\n", mapping_size); if (alt_sec) { -- 2.19.1