LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] sched/core_sched.c: remove some unused func declarations
@ 2021-08-05  6:38 Hui Su
  0 siblings, 0 replies; only message in thread
From: Hui Su @ 2021-08-05  6:38 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, linux-kernel
  Cc: Hui Su

remove some unused func declarations and make
the definitions static

Signed-off-by: Hui Su <suhui@zeku.com>
---
 kernel/sched/core_sched.c | 9 ++++-----
 kernel/sched/sched.h      | 5 -----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 9a80e9a474c0..3ddfed5231c8 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -11,7 +11,7 @@ struct sched_core_cookie {
 	refcount_t refcnt;
 };
 
-unsigned long sched_core_alloc_cookie(void)
+static unsigned long sched_core_alloc_cookie(void)
 {
 	struct sched_core_cookie *ck = kmalloc(sizeof(*ck), GFP_KERNEL);
 	if (!ck)
@@ -23,7 +23,7 @@ unsigned long sched_core_alloc_cookie(void)
 	return (unsigned long)ck;
 }
 
-void sched_core_put_cookie(unsigned long cookie)
+static void sched_core_put_cookie(unsigned long cookie)
 {
 	struct sched_core_cookie *ptr = (void *)cookie;
 
@@ -33,7 +33,7 @@ void sched_core_put_cookie(unsigned long cookie)
 	}
 }
 
-unsigned long sched_core_get_cookie(unsigned long cookie)
+static unsigned long sched_core_get_cookie(unsigned long cookie)
 {
 	struct sched_core_cookie *ptr = (void *)cookie;
 
@@ -53,7 +53,7 @@ unsigned long sched_core_get_cookie(unsigned long cookie)
  *
  * Returns: the old cookie
  */
-unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie)
+static unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie)
 {
 	unsigned long old_cookie;
 	struct rq_flags rf;
@@ -226,4 +226,3 @@ int sched_core_share_pid(unsigned int cmd, pid_t pid, enum pid_type type,
 	put_task_struct(task);
 	return err;
 }
-
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 14a41a243f7b..69b5da925da3 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1244,11 +1244,6 @@ extern void sched_core_dequeue(struct rq *rq, struct task_struct *p);
 extern void sched_core_get(void);
 extern void sched_core_put(void);
 
-extern unsigned long sched_core_alloc_cookie(void);
-extern void sched_core_put_cookie(unsigned long cookie);
-extern unsigned long sched_core_get_cookie(unsigned long cookie);
-extern unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie);
-
 #else /* !CONFIG_SCHED_CORE */
 
 static inline bool sched_core_enabled(struct rq *rq)
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05  6:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  6:38 [PATCH] sched/core_sched.c: remove some unused func declarations Hui Su

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).