提交 cabcff9b 编写于 作者: A Alexander Lobakin 提交者: Thomas Bogendoerfer

MIPS: pgtable: fix -Wshadow in asm/pgtable.h

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: NAlexander Lobakin <alobakin@pm.me>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
上级 97c97c6a
无相关合并请求
...@@ -94,31 +94,31 @@ extern void paging_init(void); ...@@ -94,31 +94,31 @@ extern void paging_init(void);
#define htw_stop() \ #define htw_stop() \
do { \ do { \
unsigned long flags; \ unsigned long __flags; \
\ \
if (cpu_has_htw) { \ if (cpu_has_htw) { \
local_irq_save(flags); \ local_irq_save(__flags); \
if(!raw_current_cpu_data.htw_seq++) { \ if(!raw_current_cpu_data.htw_seq++) { \
write_c0_pwctl(read_c0_pwctl() & \ write_c0_pwctl(read_c0_pwctl() & \
~(1 << MIPS_PWCTL_PWEN_SHIFT)); \ ~(1 << MIPS_PWCTL_PWEN_SHIFT)); \
back_to_back_c0_hazard(); \ back_to_back_c0_hazard(); \
} \ } \
local_irq_restore(flags); \ local_irq_restore(__flags); \
} \ } \
} while(0) } while(0)
#define htw_start() \ #define htw_start() \
do { \ do { \
unsigned long flags; \ unsigned long __flags; \
\ \
if (cpu_has_htw) { \ if (cpu_has_htw) { \
local_irq_save(flags); \ local_irq_save(__flags); \
if (!--raw_current_cpu_data.htw_seq) { \ if (!--raw_current_cpu_data.htw_seq) { \
write_c0_pwctl(read_c0_pwctl() | \ write_c0_pwctl(read_c0_pwctl() | \
(1 << MIPS_PWCTL_PWEN_SHIFT)); \ (1 << MIPS_PWCTL_PWEN_SHIFT)); \
back_to_back_c0_hazard(); \ back_to_back_c0_hazard(); \
} \ } \
local_irq_restore(flags); \ local_irq_restore(__flags); \
} \ } \
} while(0) } while(0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部