linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: kernel: traps: remove unused variable
@ 2020-12-10 12:44 Anders Roxell
  2020-12-29 13:07 ` Geert Uytterhoeven
  2021-01-18 20:05 ` John Paul Adrian Glaubitz
  0 siblings, 2 replies; 3+ messages in thread
From: Anders Roxell @ 2020-12-10 12:44 UTC (permalink / raw)
  To: ysato, dalias; +Cc: linux-sh, linux-kernel, Anders Roxell

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();
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sh: kernel: traps: remove unused variable
  2020-12-10 12:44 [PATCH] sh: kernel: traps: remove unused variable Anders Roxell
@ 2020-12-29 13:07 ` Geert Uytterhoeven
  2021-01-18 20:05 ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-12-29 13:07 UTC (permalink / raw)
  To: Anders Roxell
  Cc: Yoshinori Sato, Rich Felker, Linux-sh list, Linux Kernel Mailing List

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

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sh: kernel: traps: remove unused variable
  2020-12-10 12:44 [PATCH] sh: kernel: traps: remove unused variable Anders Roxell
  2020-12-29 13:07 ` Geert Uytterhoeven
@ 2021-01-18 20:05 ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-01-18 20:05 UTC (permalink / raw)
  To: Anders Roxell, ysato, dalias; +Cc: linux-sh, linux-kernel

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>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-18 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 12:44 [PATCH] sh: kernel: traps: remove unused variable Anders Roxell
2020-12-29 13:07 ` Geert Uytterhoeven
2021-01-18 20:05 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).