[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-3e184501083c38fa091f640acb13af17a21fd228@git.kernel.org>
Date: Mon, 12 Nov 2018 02:34:25 -0800
From: tip-bot for Viresh Kumar <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org, hpa@...or.com,
peterz@...radead.org, vincent.guittot@...aro.org,
viresh.kumar@...aro.org, torvalds@...ux-foundation.org,
daniel.lezcano@...aro.org, mingo@...nel.org
Subject: [tip:sched/core] sched/core: Clean up the #ifdef block in
add_nr_running()
Commit-ID: 3e184501083c38fa091f640acb13af17a21fd228
Gitweb: https://git.kernel.org/tip/3e184501083c38fa091f640acb13af17a21fd228
Author: Viresh Kumar <viresh.kumar@...aro.org>
AuthorDate: Tue, 6 Nov 2018 11:12:57 +0530
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 12 Nov 2018 11:18:06 +0100
sched/core: Clean up the #ifdef block in add_nr_running()
There is no point in keeping the conditional statement of the #if block
outside of the #ifdef block, while all of its body is contained within
the #ifdef block.
Move the conditional statement under the #ifdef block as well.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vincent Guittot <vincent.guittot@...aro.org>
Link: http://lkml.kernel.org/r/78cbd78a615d6f9fdcd3327f1ead68470f92593e.1541482935.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/sched.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index b7a3147874e3..e0e052a50fcd 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1801,12 +1801,12 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
rq->nr_running = prev_nr + count;
- if (prev_nr < 2 && rq->nr_running >= 2) {
#ifdef CONFIG_SMP
+ if (prev_nr < 2 && rq->nr_running >= 2) {
if (!READ_ONCE(rq->rd->overload))
WRITE_ONCE(rq->rd->overload, 1);
-#endif
}
+#endif
sched_update_tick_dependency(rq);
}
Powered by blists - more mailing lists