Message ID | 20201210124422.3858524-1-anders.roxell@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sh: kernel: traps: remove unused variable | expand |
On Thu, Dec 10, 2020 at 1:46 PM Anders Roxell <anders.roxell@linaro.org> wrote: > When building defconfig the following warning shows up: > > arch/sh/kernel/traps.c: In function 'nmi_trap_handler': > arch/sh/kernel/traps.c:183:15: warning: unused variable 'cpu' [-Wunused-variable] > unsigned int cpu = smp_processor_id(); > ^~~ > > Remove an unused variable 'cpu'. > > Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()") > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
On 12/10/20 1:44 PM, Anders Roxell wrote: > When building defconfig the following warning shows up: > > arch/sh/kernel/traps.c: In function 'nmi_trap_handler': > arch/sh/kernel/traps.c:183:15: warning: unused variable 'cpu' [-Wunused-variable] > unsigned int cpu = smp_processor_id(); > ^~~ > > Remove an unused variable 'cpu'. > > Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()") > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > arch/sh/kernel/traps.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c > index f5beecdac693..e76b22157099 100644 > --- a/arch/sh/kernel/traps.c > +++ b/arch/sh/kernel/traps.c > @@ -180,7 +180,6 @@ static inline void arch_ftrace_nmi_exit(void) { } > > BUILD_TRAP_HANDLER(nmi) > { > - unsigned int cpu = smp_processor_id(); > TRAP_HANDLER_DECL; > > arch_ftrace_nmi_enter(); Good catch. Now I have one warning less when building the kernel for my SH-7785LCR ;-). Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index f5beecdac693..e76b22157099 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -180,7 +180,6 @@ static inline void arch_ftrace_nmi_exit(void) { } BUILD_TRAP_HANDLER(nmi) { - unsigned int cpu = smp_processor_id(); TRAP_HANDLER_DECL; arch_ftrace_nmi_enter();
When building defconfig the following warning shows up: arch/sh/kernel/traps.c: In function 'nmi_trap_handler': arch/sh/kernel/traps.c:183:15: warning: unused variable 'cpu' [-Wunused-variable] unsigned int cpu = smp_processor_id(); ^~~ Remove an unused variable 'cpu'. Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- arch/sh/kernel/traps.c | 1 - 1 file changed, 1 deletion(-)