mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: rt: Simplify pick_task_rt()
@ 2023-04-07 19:24 Li kunyu
  0 siblings, 0 replies; only message in thread
From: Li kunyu @ 2023-04-07 19:24 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Li kunyu

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@nfschina.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


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

only message in thread, other threads:[~2023-04-06  2:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 19:24 [PATCH] sched: rt: Simplify pick_task_rt() Li kunyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®