Skip to contentSkip to conversation

sched/fair: Use true and false for bool variable

PATCH New Yang Li 1 participant 1 message Mar 8, 2021 Scheduler

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 sched/fair: Use true and false for bool variable

Fix the following coccicheck warning:
./kernel/sched/fair.c:9497:9-10: WARNING: return of 0/1 in function 'imbalanced_active_balance' with return type bool

---
 kernel/sched/fair.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/fair.c +2 -2
index 794c2cb..5388fde 100644
@@ -9494,9 +9494,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)
Signature · 1 line
1.8.3.1