Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e184501 authored by Viresh Kumar's avatar Viresh Kumar Committed by Ingo Molnar
Browse files

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Link: http://lkml.kernel.org/r/78cbd78a615d6f9fdcd3327f1ead68470f92593e.1541482935.git.viresh.kumar@linaro.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ed8885a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}