Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp485905pxb; Thu, 14 Jan 2021 10:33:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJx75ReYX2BXKGEYRFn6sWNGxyWxYWKxJVftbpjMdHQ01LcLCqb/wOxuw0/qzIoIPrZf02Jd X-Received: by 2002:a17:906:1498:: with SMTP id x24mr6030830ejc.170.1610649230418; Thu, 14 Jan 2021 10:33:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610649230; cv=none; d=google.com; s=arc-20160816; b=LvJjcngfMjggHk8eBCDwKL1W87iRLCeYDfwz3+hu58advpcp2BVpRaQXlweiNaDNXm Um6p3/z49ZWCerbzh14KY5tDbi2utwppzDGqj0UhhAdMvIf7eqLixq2kAX1eMbcqYwEH rVYIY62TOzKFY5HL6mKHVbGKsWIh6Fbg7lJABkQ4HR1el+Hck/Hf7vQnO/C4R5ait2nl TpKiGEprgOM2TFMCNRIIpdoLDlw9GwebeaXmsIhgbD4NkRqsV0s3/v08uoDmRVcrrlzH s8/s1NXBRDsfOB4KXuVBcytKy+xxJP5jmzNTCu0ssjOyc+X4X0d1c8pChGlGFvc6uotc e68g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=mtGxhBW9kZewFGijq4Pblr/ZA2c7IVmLAnYQsxxFV2Y=; b=HnB/yCoNXISX1CsSRJJR8sfMaFTLhzRLFH4ppIMTj1AWZ8fkIBwO+PcgCWCzs964D2 KUPt2R9i2oJwDI2jQTPUQ7Ptoo03O0HptAiSSd6c0PgEwayVC7v22HGFIulxJwGSxgxT hdZL+RwZa4QzFas2MeE6V6IULcB+MViSQhS+1IGnQKI+SkOcHx+RyImJLYXS0m+OJbAZ N84DKHei7XWUYf/5ymPTsSmJ2A6VHCU0B1b+Ov2MHwVh4sT42KSw0/54ludDnKj3YElI ax+BmQnuZ/xY4cfu8B3A6txMSc7EgGhAlK4uYvQW7azzxI2X6X66H5gVotDFKSzKMp6N x7Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=SR8vYtE3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kq16si2764203ejb.253.2021.01.14.10.33.26; Thu, 14 Jan 2021 10:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=SR8vYtE3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729270AbhANSbX (ORCPT + 99 others); Thu, 14 Jan 2021 13:31:23 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:62539 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727754AbhANSbX (ORCPT ); Thu, 14 Jan 2021 13:31:23 -0500 Date: Thu, 14 Jan 2021 18:30:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610649035; bh=mtGxhBW9kZewFGijq4Pblr/ZA2c7IVmLAnYQsxxFV2Y=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=SR8vYtE3ZYYxfHE5apF50UU3aFxvNYKJ7LyJPHHKljRWgAiWXBYJEN4emtTg4VZ4x 5fiaafFYGh5zCyn/vWTOT/VNotcG+YHhTcWYPQ8P7olNGCAdrmg9KedPNbkGTaKoDK tPWWkuiw6QpLiCh1UzPQbz7d21BmLo83ETJu/rv4p0jOWciALIWr09BZIVb//8qK1F Wnh+2WwnduVIqi+cWX2awSv+oZjBvkl/zJoEY84Exdqjchv8EDH5FerVLokZmlSIZM zx7zzsTOMq5NqRbYGBJ8lvqT0rhR8z6pOs37RbH4zLiKFu04yZ8PGfJEclSBRFe5n4 YPc5jr2BlUwNg== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Alexander Lobakin , Geert Uytterhoeven , Andrew Morton , Bibo Mao , Anshuman Khandual , Paul Burton , Mike Rapoport , Guoyun Sun , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH mips-next 2/2] MIPS: pgtable: fix -Wshadow in asm/pgtable.h Message-ID: <20210114183001.110729-2-alobakin@pm.me> In-Reply-To: <20210114183001.110729-1-alobakin@pm.me> References: <20210114182905.110574-1-alobakin@pm.me> <20210114183001.110729-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Solves the following repetitive warning when building with -Wshadow: In file included from ./include/linux/pgtable.h:6, from ./include/linux/mm.h:33, from ./include/linux/dax.h:6, from ./include/linux/mempolicy.h:11, from kernel/fork.c:34: ./arch/mips/include/asm/mmu_context.h: In function =E2=80=98switch_mm= =E2=80=99: ./arch/mips/include/asm/pgtable.h:97:16: warning: declaration of =E2=80= =98flags=E2=80=99 shadows a previous local [-Wshadow] 97 | unsigned long flags; \ | ^~~~~ ./arch/mips/include/asm/mmu_context.h:162:2: note: in expansion of macro = =E2=80=98htw_stop=E2=80=99 162 | htw_stop(); | ^~~~~~~~ In file included from kernel/fork.c:102: ./arch/mips/include/asm/mmu_context.h:159:16: note: shadowed declaration is= here 159 | unsigned long flags; | ^~~~~ Signed-off-by: Alexander Lobakin --- arch/mips/include/asm/pgtable.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtabl= e.h index 4f9c37616d42..4d3ab682d093 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -94,31 +94,31 @@ extern void paging_init(void); =20 #define htw_stop()=09=09=09=09=09=09=09\ do {=09=09=09=09=09=09=09=09=09\ -=09unsigned long flags;=09=09=09=09=09=09\ +=09unsigned long __flags;=09=09=09=09=09=09\ =09=09=09=09=09=09=09=09=09\ =09if (cpu_has_htw) {=09=09=09=09=09=09\ -=09=09local_irq_save(flags);=09=09=09=09=09\ +=09=09local_irq_save(__flags);=09=09=09=09\ =09=09if(!raw_current_cpu_data.htw_seq++) {=09=09=09\ =09=09=09write_c0_pwctl(read_c0_pwctl() &=09=09\ =09=09=09=09 ~(1 << MIPS_PWCTL_PWEN_SHIFT));=09\ =09=09=09back_to_back_c0_hazard();=09=09=09\ =09=09}=09=09=09=09=09=09=09\ -=09=09local_irq_restore(flags);=09=09=09=09\ +=09=09local_irq_restore(__flags);=09=09=09=09\ =09}=09=09=09=09=09=09=09=09\ } while(0) =20 #define htw_start()=09=09=09=09=09=09=09\ do {=09=09=09=09=09=09=09=09=09\ -=09unsigned long flags;=09=09=09=09=09=09\ +=09unsigned long __flags;=09=09=09=09=09=09\ =09=09=09=09=09=09=09=09=09\ =09if (cpu_has_htw) {=09=09=09=09=09=09\ -=09=09local_irq_save(flags);=09=09=09=09=09\ +=09=09local_irq_save(__flags);=09=09=09=09\ =09=09if (!--raw_current_cpu_data.htw_seq) {=09=09=09\ =09=09=09write_c0_pwctl(read_c0_pwctl() |=09=09\ =09=09=09=09 (1 << MIPS_PWCTL_PWEN_SHIFT));=09\ =09=09=09back_to_back_c0_hazard();=09=09=09\ =09=09}=09=09=09=09=09=09=09\ -=09=09local_irq_restore(flags);=09=09=09=09\ +=09=09local_irq_restore(__flags);=09=09=09=09\ =09}=09=09=09=09=09=09=09=09\ } while(0) =20 --=20 2.30.0