[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210824062359.59474-1-deng.changcheng@zte.com.cn>
Date: Mon, 23 Aug 2021 23:23:59 -0700
From: CGEL <cgel.zte@...il.com>
To: Ingo Molnar <mingo@...hat.com>
Cc: 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>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
linux-kernel@...r.kernel.org,
Jing Yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] kernel:fair: fix boolreturn.cocci warnings
From: Jing Yangyang <jing.yangyang@....com.cn>
./kernel/sched/fair.c:9638:9-10:WARNING: return of 0/1 in function
'imbalanced_active_balance' with return type bool
Return statements in functions returning bool should use true/false
instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@....com.cn>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d425d11..d90527e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9635,9 +9635,9 @@ static struct rq *find_busiest_queue(struct lb_env *env,
*/
if ((env->migration_type == migrate_task) &&
(sd->nr_balance_failed > sd->cache_nice_tries+2))
- return 1;
+ return true;
- return 0;
+ return false;
}
static int need_active_balance(struct lb_env *env)
--
1.8.3.1
Powered by blists - more mailing lists