[PATCH 02/10] sched/topology: Replace 1 and 0 by boolean value

From: Jules Irenge
Date: Fri Mar 27 2020 - 17:24:25 EST


From: Jules Irenge <jbi.octave@xxxxxxxxxxx>

Coccinelle reports a warning inside sched_energy_aware_handler()

WARNING: Assignment of 0/1 to bool variable

To fix this, 1 is replaced by true and 0 by false.
Given that variable sched_energy_update is of bool type.
This fixes the warnings.

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxxxx>
---
kernel/sched/topology.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index dfb64c08a407..9d70cc68e549 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -221,9 +221,9 @@ int sched_energy_aware_handler(struct ctl_table *table, int write,
state = static_branch_unlikely(&sched_energy_present);
if (state != sysctl_sched_energy_aware) {
mutex_lock(&sched_energy_mutex);
- sched_energy_update = 1;
+ sched_energy_update = true;
rebuild_sched_domains();
- sched_energy_update = 0;
+ sched_energy_update = false;
mutex_unlock(&sched_energy_mutex);
}
}
--
2.25.1