LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: remove unused variable
@ 2021-04-14 17:05 Eric Dumazet
  2021-05-10 20:11 ` Eric Dumazet
  2021-05-10 21:26 ` [tip: irq/urgent] sh: Remove " tip-bot2 for Eric Dumazet
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2021-04-14 17:05 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, Eric Dumazet, Eric Dumazet, Frederic Weisbecker,
	Yoshinori Sato, Rich Felker

From: Eric Dumazet <edumazet@google.com>

Removes this annoying warning:

arch/sh/kernel/traps.c: In function ‘nmi_trap_handler’:
arch/sh/kernel/traps.c:183:15: warning: unused variable ‘cpu’ [-Wunused-variable]
  183 |  unsigned int cpu = smp_processor_id();

Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.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 f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 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.31.1.295.g9ea45b61b8-goog


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

* Re: [PATCH] sh: remove unused variable
  2021-04-14 17:05 [PATCH] sh: remove unused variable Eric Dumazet
@ 2021-05-10 20:11 ` Eric Dumazet
  2021-05-10 20:56   ` Thomas Gleixner
  2021-05-10 21:26 ` [tip: irq/urgent] sh: Remove " tip-bot2 for Eric Dumazet
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2021-05-10 20:11 UTC (permalink / raw)
  To: Eric Dumazet, Thomas Gleixner
  Cc: linux-kernel, Eric Dumazet, Frederic Weisbecker, Yoshinori Sato,
	Rich Felker



On 4/14/21 7:05 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> Removes this annoying warning:
> 
> arch/sh/kernel/traps.c: In function ‘nmi_trap_handler’:
> arch/sh/kernel/traps.c:183:15: warning: unused variable ‘cpu’ [-Wunused-variable]
>   183 |  unsigned int cpu = smp_processor_id();
> 
> Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Frederic Weisbecker <frederic@kernel.org>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.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 f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 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();
> 

Is there anything wrong with this patch ?

Thanks !

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

* Re: [PATCH] sh: remove unused variable
  2021-05-10 20:11 ` Eric Dumazet
@ 2021-05-10 20:56   ` Thomas Gleixner
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2021-05-10 20:56 UTC (permalink / raw)
  To: Eric Dumazet, Eric Dumazet
  Cc: linux-kernel, Eric Dumazet, Frederic Weisbecker, Yoshinori Sato,
	Rich Felker

On Mon, May 10 2021 at 22:11, Eric Dumazet wrote:
> On 4/14/21 7:05 PM, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>> 
>> Removes this annoying warning:
>> 
>> arch/sh/kernel/traps.c: In function ‘nmi_trap_handler’:
>> arch/sh/kernel/traps.c:183:15: warning: unused variable ‘cpu’ [-Wunused-variable]
>>   183 |  unsigned int cpu = smp_processor_id();
>> 
>> Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()")
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Frederic Weisbecker <frederic@kernel.org>
>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
>> Cc: Rich Felker <dalias@libc.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 f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 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();
>> 
>
> Is there anything wrong with this patch ?

No. I was expecting that it gets picked up by sh folks. Let me take care
of it as I introduced that issue after all.

Thanks,

        tglx

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

* [tip: irq/urgent] sh: Remove unused variable
  2021-04-14 17:05 [PATCH] sh: remove unused variable Eric Dumazet
  2021-05-10 20:11 ` Eric Dumazet
@ 2021-05-10 21:26 ` tip-bot2 for Eric Dumazet
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Eric Dumazet @ 2021-05-10 21:26 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Eric Dumazet, Thomas Gleixner, stable, x86, linux-kernel, maz

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     0d3ae948741ac6d80e39ab27b45297367ee477de
Gitweb:        https://git.kernel.org/tip/0d3ae948741ac6d80e39ab27b45297367ee477de
Author:        Eric Dumazet <edumazet@google.com>
AuthorDate:    Wed, 14 Apr 2021 10:05:17 -07:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 10 May 2021 23:23:04 +02:00

sh: Remove unused variable

Removes this annoying warning:

arch/sh/kernel/traps.c: In function ‘nmi_trap_handler’:
arch/sh/kernel/traps.c:183:15: warning: unused variable ‘cpu’ [-Wunused-variable]
  183 |  unsigned int cpu = smp_processor_id();

Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210414170517.1205430-1-eric.dumazet@gmail.com
---
 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 f5beecd..e76b221 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();

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

end of thread, other threads:[~2021-05-10 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 17:05 [PATCH] sh: remove unused variable Eric Dumazet
2021-05-10 20:11 ` Eric Dumazet
2021-05-10 20:56   ` Thomas Gleixner
2021-05-10 21:26 ` [tip: irq/urgent] sh: Remove " tip-bot2 for Eric Dumazet

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 read-only IMAP folder(s) and NNTP newsgroup(s).