sched/core: Remove unnecessary unlikely() in push_*_task()

WARN_ON() already contains an unlikely(), so it's not necessary to
use WARN_ON(1).

Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Yangtao Li 2018-11-03 13:26:02 -04:00 • committed by Ingo Molnar
commit 9ebc605381
2 changed files with 2 additions and 6 deletions

View file

@ -2042,10 +2042,8 @@ static int push_dl_task(struct rq *rq)
return 0;
retry:
if (unlikely(next_task == rq->curr)) {
WARN_ON(1);
if (WARN_ON(next_task == rq->curr))
return 0;
}
/*
* If next_task preempts rq->curr, and rq->curr

View file

@ -1813,10 +1813,8 @@ static int push_rt_task(struct rq *rq)
return 0;
retry:
if (unlikely(next_task == rq->curr)) {
WARN_ON(1);
if (WARN_ON(next_task == rq->curr))
return 0;
}
/*
* It's possible that the next_task slipped in of