[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200327212358.5752-8-jbi.octave@gmail.com>
Date: Fri, 27 Mar 2020 21:23:54 +0000
From: Jules Irenge <jbi.octave@...il.com>
To: julia.lawall@...6.fr
Cc: boqun.feng@...il.com, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org (open list:SCHEDULER)
Subject: [PATCH 07/10] sched/fair: Replace 1 and 0 by boolean value
Coccinelle reports a warning at voluntary_active_balance
WARNING: return of 0/1 in function voluntary_active_balance with return type bool
To fix this, 1 is replaced by true and 0 by false.
Given that voluntary_active_balance() is of bool type.
This fixes the warnings.
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
kernel/sched/fair.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c1217bfe5e81..b11bb08687a9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9082,7 +9082,7 @@ voluntary_active_balance(struct lb_env *env)
struct sched_domain *sd = env->sd;
if (asym_active_balance(env))
- return 1;
+ return true;
/*
* The dst_cpu is idle and the src_cpu CPU has only 1 CFS task.
@@ -9094,13 +9094,13 @@ voluntary_active_balance(struct lb_env *env)
(env->src_rq->cfs.h_nr_running == 1)) {
if ((check_cpu_capacity(env->src_rq, sd)) &&
(capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100))
- return 1;
+ return true;
}
if (env->migration_type == migrate_misfit)
- return 1;
+ return true;
- return 0;
+ return false;
}
static int need_active_balance(struct lb_env *env)
--
2.25.1
Powered by blists - more mailing lists