[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230407192435.3390-1-kunyu@nfschina.com>
Date: Sat, 8 Apr 2023 03:24:35 +0800
From: Li kunyu <kunyu@...china.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vschneid@...hat.com
Cc: linux-kernel@...r.kernel.org, Li kunyu <kunyu@...china.com>
Subject: [PATCH] sched: rt: Simplify pick_task_rt()
Remove useless intermediate variable "p" and its initialization.
Directly return the next RT scheduling task obtained from
_pick_next_task_rt().
Signed-off-by: Li kunyu <kunyu@...china.com>
---
kernel/sched/rt.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index e9b1c08c20a7..71c930fafac5 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1799,14 +1799,10 @@ static struct task_struct *_pick_next_task_rt(struct rq *rq)
static struct task_struct *pick_task_rt(struct rq *rq)
{
- struct task_struct *p;
-
if (!sched_rt_runnable(rq))
return NULL;
- p = _pick_next_task_rt(rq);
-
- return p;
+ return _pick_next_task_rt(rq);
}
static struct task_struct *pick_next_task_rt(struct rq *rq)
--
2.18.2
Powered by blists - more mailing lists