public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Return true,false in voluntary_active_balance()
@ 2020-05-07 11:06 Jason Yan
  2020-05-07 11:17 ` Valentin Schneider
  2020-05-08  8:16 ` Peter Zijlstra
  0 siblings, 2 replies; 13+ messages in thread
From: Jason Yan @ 2020-05-07 11:06 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, linux-kernel
  Cc: Jason Yan

Fix the following coccicheck warning:

kernel/sched/fair.c:9375:9-10: WARNING: return of 0/1 in function
'voluntary_active_balance' with return type bool

Signed-off-by: Jason Yan <yanaijie@huawei.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 b3bb4d6e49c3..e8390106ada4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9373,7 +9373,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.
@@ -9385,13 +9385,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.21.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-05-08  9:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-07 11:06 [PATCH] sched/fair: Return true,false in voluntary_active_balance() Jason Yan
2020-05-07 11:17 ` Valentin Schneider
2020-05-07 17:28   ` Steven Rostedt
2020-05-07 17:30     ` Steven Rostedt
2020-05-07 17:52       ` Valentin Schneider
2020-05-07 17:55       ` Joe Perches
2020-05-07 18:45         ` Steven Rostedt
2020-05-07 19:06           ` Joe Perches
2020-05-07 19:45             ` Steven Rostedt
2020-05-07 20:18               ` Joe Perches
2020-05-08  8:16 ` Peter Zijlstra
2020-05-08  9:06   ` Rasmus Villemoes
2020-05-08  9:24   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox