Skip to contentSkip to conversation

sh: remove unused variable

PATCH Applied Eric Dumazet 3 participants 4 messages Apr 14, 2021 – May 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: remove unused variable

From: Eric Dumazet <[email protected]>

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()")
Cc Thomas Gleixner <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sh/kernel/traps.c | 1 -
 1 file changed, 1 deletion(-)
arch/sh/kernel/traps.c +0 -1
index f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 100644
@@ -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();
Signature · 1 line
2.31.1.295.g9ea45b61b8-goog
#1 lore raw
Quoted 24 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

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()")
Cc Thomas Gleixner <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sh/kernel/traps.c | 1 -
 1 file changed, 1 deletion(-)
arch/sh/kernel/traps.c +0 -0
index f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 100644

arch/sh/kernel/traps.c static inline void arch_ftrace_nmi_exit(void) { } · line 185

Quoted 7 lines
arch/sh/kernel/traps.c +0 -1
@@ -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 !

#2 lore raw
Quoted 30 lines · Eric Dumazet
Quoted 29 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

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()")
Cc Thomas Gleixner <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sh/kernel/traps.c | 1 -
 1 file changed, 1 deletion(-)
arch/sh/kernel/traps.c +0 -1
index f5beecdac69382f2d719fa33d50b9d58e22f6ff8..e76b221570999776e3bc9276d6b2fd60b9132e94 100644
@@ -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;
 
Quoted 4 lines

arch/sh/kernel/traps.c static inline void arch_ftrace_nmi_exit(void) { } · line 185

Quoted 2 lines
arch/sh/kernel/traps.c +0 -0
 	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

merge bot Applied
#3 lore raw

[tip: irq/urgent] sh: Remove unused variable

In reply to Eric Dumazet
The following commit has been merged into the irq/urgent branch of tip:

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 <[email protected]>
AuthorDate:    Wed, 14 Apr 2021 10:05:17 -07:00
Committer:     Thomas Gleixner <[email protected]>
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();

---
 arch/sh/kernel/traps.c | 1 -
 1 file changed, 1 deletion(-)
arch/sh/kernel/traps.c +0 -1
index f5beecd..e76b221 100644
@@ -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();