Skip to content

Commit 3e18450

Browse files
vireshkIngo Molnar
authored andcommitted
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 <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vincent Guittot <[email protected]> Link: http://lkml.kernel.org/r/78cbd78a615d6f9fdcd3327f1ead68470f92593e.1541482935.git.viresh.kumar@linaro.org Signed-off-by: Ingo Molnar <[email protected]>
1 parent ed8885a commit 3e18450

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/sched/sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,12 +1801,12 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
18011801

18021802
rq->nr_running = prev_nr + count;
18031803

1804-
if (prev_nr < 2 && rq->nr_running >= 2) {
18051804
#ifdef CONFIG_SMP
1805+
if (prev_nr < 2 && rq->nr_running >= 2) {
18061806
if (!READ_ONCE(rq->rd->overload))
18071807
WRITE_ONCE(rq->rd->overload, 1);
1808-
#endif
18091808
}
1809+
#endif
18101810

18111811
sched_update_tick_dependency(rq);
18121812
}

0 commit comments

Comments
 (0)