[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220429075201.68581-1-jiapeng.chong@linux.alibaba.com>
Date: Fri, 29 Apr 2022 15:52:01 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: mingo@...hat.com
Cc: 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,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] sched/fair: Return true/false (not 1/0) from bool functions
Return statements in functions returning bool should use true/false
instead of 1/0.
./kernel/sched/fair.c:9850:9-10: WARNING: return of 0/1 in function
'imbalanced_active_balance' with return type bool.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.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 b0cd242373ec..6f3113e26d26 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9847,9 +9847,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.20.1.7.g153144c
Powered by blists - more mailing lists