sched: rt: Simplify pick_task_rt()
Commit Message
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(-)
@@ -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)