um: process: remove unused 'n' variable
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 Mar 2024 09:06:38 +0000 (10:06 +0100)
committerRichard Weinberger <richard@nod.at>
Mon, 22 Apr 2024 20:30:11 +0000 (22:30 +0200)
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>
Reviewed-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/process.c

index 1395ff3017f01417497e13d75036ca12da7f7ef9..e5d7d24045a23eae89ad5b8534b7b824c546e94e 100644 (file)
@@ -109,7 +109,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)
@@ -122,7 +122,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);
 }