linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khalid Ali <khaliidcaliy@gmail.com>
To: tglx@linutronix.de, peterz@infradead.org, luto@kernel.org
Cc: linux-kernel@vger.kernel.org, Khalid Ali <khaliidcaliy@gmail.com>
Subject: [PATCH] kernel/entry: Remove unneeded header "common.h"
Date: Wed, 11 Jun 2025 07:23:48 +0000	[thread overview]
Message-ID: <20250611072400.4376-1-khaliidcaliy@gmail.com> (raw)

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@gmail.com>
---
 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


             reply	other threads:[~2025-06-11  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11  7:23 Khalid Ali [this message]
2025-06-13 16:12 ` [PATCH] kernel/entry: Remove unneeded header "common.h" Thomas Gleixner
2025-06-14 19:47   ` Khalid Ali
2025-06-16  7:01     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250611072400.4376-1-khaliidcaliy@gmail.com \
    --to=khaliidcaliy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).