diff mbox series

[5/5] um: process: remove unused 'n' variable

Message ID 20240328100640.cec1867f0944.I739ea3921fa4354f4afcd6de1d3db2056ea11c72@changeid
State New
Headers show
Series [1/5] um: signal: move pid variable where needed | expand

Commit Message

Johannes Berg March 28, 2024, 9:06 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

The return value of fn() wasn't used for a long time,
so no need to assign it to a variable, addressing a
W=1 warning.

This seems to be - with patches from others posted to
the list before - the last W=1 warning in arch/um/.

Fixes: 22e2430d60db ("x86, um: convert to saner kernel_execve() semantics")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 arch/um/kernel/process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 30bf7739ed0f..d2134802f6a8 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -102,7 +102,7 @@  int get_current_pid(void)
  */
 void new_thread_handler(void)
 {
-	int (*fn)(void *), n;
+	int (*fn)(void *);
 	void *arg;
 
 	if (current->thread.prev_sched != NULL)
@@ -115,7 +115,7 @@  void new_thread_handler(void)
 	/*
 	 * callback returns only if the kernel thread execs a process
 	 */
-	n = fn(arg);
+	fn(arg);
 	userspace(&current->thread.regs.regs, current_thread_info()->aux_fp_regs);
 }