[tip:sched/core] sched/fair: Clean up load_balance() condition

From: tip-bot for Valentin Schneider
Date: Sat Nov 03 2018 - 20:13:49 EST


Commit-ID: 47b7aee14fd7e453370a5d15dfb11c958ca360f2
Gitweb: https://git.kernel.org/tip/47b7aee14fd7e453370a5d15dfb11c958ca360f2
Author: Valentin Schneider <valentin.schneider@xxxxxxx>
AuthorDate: Wed, 26 Sep 2018 16:12:06 +0100
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Sun, 4 Nov 2018 00:59:22 +0100

sched/fair: Clean up load_balance() condition

The alignment of the condition is off, clean that up.

Also, logical operators have lower precedence than bitwise/relational
operators, so remove one layer of parentheses to make the condition a
bit simpler to follow.

Signed-off-by: Valentin Schneider <valentin.schneider@xxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Dietmar.Eggemann@xxxxxxx
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: patrick.bellasi@xxxxxxx
Cc: vincent.guittot@xxxxxxxxxx
Link: http://lkml.kernel.org/r/1537974727-30788-1-git-send-email-valentin.schneider@xxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/fair.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ee271bb661cc..4e298931a715 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8877,9 +8877,9 @@ out_all_pinned:

out_one_pinned:
/* tune up the balancing interval */
- if (((env.flags & LBF_ALL_PINNED) &&
- sd->balance_interval < MAX_PINNED_INTERVAL) ||
- (sd->balance_interval < sd->max_interval))
+ if ((env.flags & LBF_ALL_PINNED &&
+ sd->balance_interval < MAX_PINNED_INTERVAL) ||
+ sd->balance_interval < sd->max_interval)
sd->balance_interval *= 2;

ld_moved = 0;