[PATCH v2 1/4] cpu: Remove Comparison to bool

From: Jules Irenge
Date: Sun Mar 29 2020 - 21:25:12 EST


Coccinelle reports a warning inside __cpuhp_state_add_instance_cpuslocked()

WARNING: Comparison to bool

To fix this a comparison to a bool variable to false is removed
and replaced with the operator ! before the variable

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9c706af713fb..97f8b79ba5f5 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1682,7 +1682,7 @@ int __cpuhp_state_add_instance_cpuslocked(enum cpuhp_state state,
lockdep_assert_cpus_held();

sp = cpuhp_get_step(state);
- if (sp->multi_instance == false)
+ if (!sp->multi_instance)
return -EINVAL;

mutex_lock(&cpuhp_state_mutex);
--
2.25.1