lkml.org 
[lkml]   [2022]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched/fair: fix boolreturn.cocci warning
Date
Return statements in functions returning bool should use true/false
instead of 1/0.

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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 8bcc1dbc544c..bba2f9d94e53 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9843,9 +9843,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
\
 
 \ /
  Last update: 2022-03-17 02:48    [W:0.034 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site