2020-10-22 20:27:17

by Hui Su

[permalink] [raw]
Subject: [PATCH] sched/deadline: remove the param struct rq in pick_next_dl_entity()

we can get the next dl_entity just from struct dl_rq,
and do not need the param struct rq.
So remove it.
Like the change: https://lkml.org/lkml/2020/9/29/2030

Signed-off-by: Hui Su <[email protected]>
---
kernel/sched/deadline.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 6d93f4518734..2736764c3cbc 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1837,8 +1837,7 @@ static void set_next_task_dl(struct rq *rq, struct task_struct *p, bool first)
deadline_queue_push_tasks(rq);
}

-static struct sched_dl_entity *pick_next_dl_entity(struct rq *rq,
- struct dl_rq *dl_rq)
+static struct sched_dl_entity *pick_next_dl_entity(struct dl_rq *dl_rq)
{
struct rb_node *left = rb_first_cached(&dl_rq->root);

@@ -1857,7 +1856,7 @@ static struct task_struct *pick_next_task_dl(struct rq *rq)
if (!sched_dl_runnable(rq))
return NULL;

- dl_se = pick_next_dl_entity(rq, dl_rq);
+ dl_se = pick_next_dl_entity(dl_rq);
BUG_ON(!dl_se);
p = dl_task_of(dl_se);
set_next_task_dl(rq, p, true);
--
2.25.1