]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
entry: Remove unused syscall argument from syscall_trace_enter()
authorJinjie Ruan <ruanjinjie@huawei.com>
Wed, 28 Jan 2026 03:19:21 +0000 (11:19 +0800)
committerThomas Gleixner <tglx@kernel.org>
Fri, 30 Jan 2026 14:38:09 +0000 (15:38 +0100)
The 'syscall' argument of syscall_trace_enter() is immediately overwritten
before any real use and serves only as a local variable, so drop the
parameter.

No functional change intended.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260128031934.3906955-2-ruanjinjie@huawei.com
include/linux/entry-common.h
kernel/entry/syscall-common.c

index 87efb38b70817fd9371942e5ffd7a55d225edca7..e4a8287af822e3d824065bf78e804a98c51ce192 100644 (file)
@@ -45,7 +45,7 @@
                                 SYSCALL_WORK_SYSCALL_EXIT_TRAP |       \
                                 ARCH_SYSCALL_WORK_EXIT)
 
-long syscall_trace_enter(struct pt_regs *regs, long syscall, unsigned long work);
+long syscall_trace_enter(struct pt_regs *regs, unsigned long work);
 
 /**
  * syscall_enter_from_user_mode_work - Check and handle work before invoking
@@ -75,7 +75,7 @@ static __always_inline long syscall_enter_from_user_mode_work(struct pt_regs *re
        unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
 
        if (work & SYSCALL_WORK_ENTER)
-               syscall = syscall_trace_enter(regs, syscall, work);
+               syscall = syscall_trace_enter(regs, work);
 
        return syscall;
 }
index 940a597ded40fbdb708c3116504c5c663df4b37f..e6237b536d8b7a54ca092fcf301be7701a059fa7 100644 (file)
@@ -17,10 +17,9 @@ static inline void syscall_enter_audit(struct pt_regs *regs, long syscall)
        }
 }
 
-long syscall_trace_enter(struct pt_regs *regs, long syscall,
-                               unsigned long work)
+long syscall_trace_enter(struct pt_regs *regs, unsigned long work)
 {
-       long ret = 0;
+       long syscall, ret = 0;
 
        /*
         * Handle Syscall User Dispatch.  This must comes first, since