[PATCH] kernel/entry: Remove unneeded header "common.h"

From: Khalid Ali
Date: Wed Jun 11 2025 - 03:25:24 EST


syscall_user_dispatch() is part syscall user dispatch and it has a
header already, so this patch moves that function to
include/linux/syscall_user_dispatch.h which fits well. In that case we don't need
common.h anymore. All functions related to syscall
user dispatch are on that header i mentioned, so this one shouldn't be
special. We need to access the function from that header.

Signed-off-by: Khalid Ali <khaliidcaliy@xxxxxxxxx>
---
include/linux/syscall_user_dispatch.h | 2 ++
kernel/entry/common.c | 3 +--
kernel/entry/common.h | 7 -------
kernel/entry/syscall_user_dispatch.c | 2 --
4 files changed, 3 insertions(+), 11 deletions(-)
delete mode 100644 kernel/entry/common.h

diff --git a/include/linux/syscall_user_dispatch.h b/include/linux/syscall_user_dispatch.h
index 3858a6ffdd5c..6fffca47b136 100644
--- a/include/linux/syscall_user_dispatch.h
+++ b/include/linux/syscall_user_dispatch.h
@@ -48,4 +48,6 @@ static inline int syscall_user_dispatch_set_config(struct task_struct *task,

#endif /* CONFIG_GENERIC_ENTRY */

+bool syscall_user_dispatch(struct pt_regs *regs);
+
#endif /* _SYSCALL_USER_DISPATCH_H */
diff --git a/kernel/entry/common.c b/kernel/entry/common.c
index a8dd1f27417c..e774dc9e7eaf 100644
--- a/kernel/entry/common.c
+++ b/kernel/entry/common.c
@@ -9,8 +9,7 @@
#include <linux/livepatch.h>
#include <linux/audit.h>
#include <linux/tick.h>
-
-#include "common.h"
+#include <linux/syscall_user_dispatch.h>

#define CREATE_TRACE_POINTS
#include <trace/events/syscalls.h>
diff --git a/kernel/entry/common.h b/kernel/entry/common.h
deleted file mode 100644
index f6e6d02f07fe..000000000000
--- a/kernel/entry/common.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _COMMON_H
-#define _COMMON_H
-
-bool syscall_user_dispatch(struct pt_regs *regs);
-
-#endif
diff --git a/kernel/entry/syscall_user_dispatch.c b/kernel/entry/syscall_user_dispatch.c
index 5340c5aa89e7..b88a4b546d70 100644
--- a/kernel/entry/syscall_user_dispatch.c
+++ b/kernel/entry/syscall_user_dispatch.c
@@ -15,8 +15,6 @@

#include <asm/syscall.h>

-#include "common.h"
-
static void trigger_sigsys(struct pt_regs *regs)
{
struct kernel_siginfo info;
--
2.49.0