[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-9ebc6053814d37b9de8cc291fba28f30a729c929@git.kernel.org>
Date: Tue, 11 Dec 2018 07:31:59 -0800
From: tip-bot for Yangtao Li <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: torvalds@...ux-foundation.org, hpa@...or.com, peterz@...radead.org,
efault@....de, linux-kernel@...r.kernel.org, mingo@...nel.org,
tiny.windzz@...il.com, tglx@...utronix.de
Subject: [tip:sched/core] sched/core: Remove unnecessary unlikely() in
push_*_task()
Commit-ID: 9ebc6053814d37b9de8cc291fba28f30a729c929
Gitweb: https://git.kernel.org/tip/9ebc6053814d37b9de8cc291fba28f30a729c929
Author: Yangtao Li <tiny.windzz@...il.com>
AuthorDate: Sat, 3 Nov 2018 13:26:02 -0400
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 11 Dec 2018 15:16:57 +0100
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 <tiny.windzz@...il.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20181103172602.1917-1-tiny.windzz@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/deadline.c | 4 +---
kernel/sched/rt.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b32bc1f7cd14..fb8b7b5d745d 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 9aa3287ce301..e4f398ad9e73 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -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
Powered by blists - more mailing lists