[<prev] [next>] [day] [month] [year] [list]
Message-Id: <190b5c2f2f2fb9cc775fce8daed72bf893be48a4.1642065293.git.davidcomponentone@gmail.com>
Date: Fri, 14 Jan 2022 08:12:07 +0800
From: davidcomponentone@...il.com
To: mingo@...hat.com
Cc: davidcomponentone@...il.com, peterz@...radead.org,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, bristot@...hat.com, linux-kernel@...r.kernel.org,
Yang Guang <yang.guang5@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] sched/fair: fix boolreturn.cocci warning
From: Yang Guang <yang.guang5@....com.cn>
The coccinelle report
./kernel/sched/fair.c:9726: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.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Yang Guang <yang.guang5@....com.cn>
Signed-off-by: David Yang <davidcomponentone@...il.com>
---
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 095b0aa378df..354a36c1ab69 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9723,9 +9723,9 @@ imbalanced_active_balance(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)
--
2.30.2
Powered by blists - more mailing lists