[PATCH linux-next] kernel:fair: fix boolreturn.cocci warnings

From: CGEL
Date: Tue Aug 24 2021 - 02:24:19 EST


From: Jing Yangyang <jing.yangyang@xxxxxxxxxx>

./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@xxxxxxxxxx>
Signed-off-by: Jing Yangyang <jing.yangyang@xxxxxxxxxx>
---
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