Skip to content

Commit 275aca6

Browse files
nathanchancetsbogend
authored andcommitted
MIPS: Drop unused positional parameter in local_irq_{dis,en}able
When building with clang's integrated assembler, it points out that the CONFIG_CPU_HAS_DIEI versions of local_irq_enable and local_irq_disable have a named parameter that is not used in the body of the macro and it thinks that $8 is a positional parameter, rather than a register: arch/mips/include/asm/asmmacro.h:48:2: warning: macro defined with named parameters which are not used in macro body, possible positional parameter found in body which will have no effect .macro local_irq_enable reg=$8 ^ The comment above the function that performs this check in LLVM notes that the warning may trigger in this case, even though it is not problematic. It is easy enough to clean this up by just omitting the named parameter for this version of the macro, as it is entirely unused. Reported-by: Nick Desaulniers <ndesaulniers@google.com> Link: ClangBuiltLinux#1415 Link: llvm/llvm-project@81c944c Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent c86df6c commit 275aca6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/mips/include/asm/asmmacro.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
#endif
4646

4747
#ifdef CONFIG_CPU_HAS_DIEI
48-
.macro local_irq_enable reg=t0
48+
.macro local_irq_enable
4949
ei
5050
irq_enable_hazard
5151
.endm
5252

53-
.macro local_irq_disable reg=t0
53+
.macro local_irq_disable
5454
di
5555
irq_disable_hazard
5656
.endm

0 commit comments

Comments
 (0)