From patchwork Thu Jan 14 18:30:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 12020619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C9FCC433DB for ; Thu, 14 Jan 2021 18:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D39B523B1F for ; Thu, 14 Jan 2021 18:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726735AbhANSbR (ORCPT ); Thu, 14 Jan 2021 13:31:17 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:16689 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727754AbhANSbR (ORCPT ); Thu, 14 Jan 2021 13:31:17 -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 Precedence: bulk List-ID: X-Mailing-List: linux-mips@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 ‘switch_mm’: ./arch/mips/include/asm/pgtable.h:97:16: warning: declaration of ‘flags’ shadows a previous local [-Wshadow] 97 | unsigned long flags; \ | ^~~~~ ./arch/mips/include/asm/mmu_context.h:162:2: note: in expansion of macro ‘htw_stop’ 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/pgtable.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); #define htw_stop() \ do { \ - unsigned long flags; \ + unsigned long __flags; \ \ if (cpu_has_htw) { \ - local_irq_save(flags); \ + local_irq_save(__flags); \ if(!raw_current_cpu_data.htw_seq++) { \ write_c0_pwctl(read_c0_pwctl() & \ ~(1 << MIPS_PWCTL_PWEN_SHIFT)); \ back_to_back_c0_hazard(); \ } \ - local_irq_restore(flags); \ + local_irq_restore(__flags); \ } \ } while(0) #define htw_start() \ do { \ - unsigned long flags; \ + unsigned long __flags; \ \ if (cpu_has_htw) { \ - local_irq_save(flags); \ + local_irq_save(__flags); \ if (!--raw_current_cpu_data.htw_seq) { \ write_c0_pwctl(read_c0_pwctl() | \ (1 << MIPS_PWCTL_PWEN_SHIFT)); \ back_to_back_c0_hazard(); \ } \ - local_irq_restore(flags); \ + local_irq_restore(__flags); \ } \ } while(0)