[PATCH] sched: remove noop function task_fork_dl

From: Tom Rix
Date: Wed Nov 27 2019 - 12:03:37 EST



task_fork_dl is an empty function used only for dl's
sched_class.task_fork. Removing it cleans up the code a bit
and saves a function call in sched_fork.

Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
---
Âkernel/sched/deadline.c | 10 ----------
Â1 file changed, 10 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index a8a08030a8f7..fbafd97d883a 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1821,14 +1821,6 @@ static void task_tick_dl(struct rq *rq, struct task_struct *p, int queued)
ÂÂÂÂ ÂÂÂ start_hrtick_dl(rq, p);
Â}
Â
-static void task_fork_dl(struct task_struct *p)
-{
-ÂÂÂ /*
-ÂÂÂ Â* SCHED_DEADLINE tasks cannot fork and this is achieved through
-ÂÂÂ Â* sched_fork()
-ÂÂÂ Â*/
-}
-
Â#ifdef CONFIG_SMP
Â
Â/* Only try algorithms three times */
@@ -2451,8 +2443,6 @@ const struct sched_class dl_sched_class = {
Â#endif
Â
ÂÂÂÂ .task_tickÂÂÂ ÂÂÂ = task_tick_dl,
-ÂÂÂ .task_forkÂÂÂÂÂÂÂÂÂÂÂÂÂ = task_fork_dl,
-
ÂÂÂÂ .prio_changedÂÂÂÂÂÂÂÂÂÂ = prio_changed_dl,
ÂÂÂÂ .switched_fromÂÂÂ ÂÂÂ = switched_from_dl,
ÂÂÂÂ .switched_toÂÂÂ ÂÂÂ = switched_to_dl,
--
2.23.0