Commit 9ebc6053 authored by Yangtao Li's avatar Yangtao Li Committed by Ingo Molnar

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: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20181103172602.1917-1-tiny.windzz@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 765d0af1
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment