[PATCH] cpu: Bool tests don't need comparisons

From: Wen Yang
Date: Sat Dec 01 2018 - 03:06:01 EST


This is the patch to the file cpu.c
which fixes the following coccinelle warning:

WARNING: Comparison to bool

Signed-off-by: Wen Yang <wen.yang99@xxxxxxxxxx>
CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxxxxx>
CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CC: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
CC: "Peter Zijlstra (Intel)" <peterz@xxxxxxxxxxxx>
CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CC: Mukesh Ojha <mojha@xxxxxxxxxxxxxx>
CC: linux-kernel@xxxxxxxxxxxxxxx
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 91d5c38eb7e5..5bdd7e150a11 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1650,7 +1650,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.19.1