[PATCH 03/10] cpu: Remove Comparison to bool
From: Jules Irenge
Date: Fri Mar 27 2020 - 17:24:26 EST
From: Jules Irenge <jbi.octave@xxxxxxxxxxx>
Coccinelle reports a warning inside __cpuhp_state_add_instance_cpuslocked
WARNING: Comparison to bool
To fix this, the comparison to bool is removed
This not only fixes the issue but also removes the unnecessary comparison.
Remove comparison to bool
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/cpu.c | 2 +-
kernel/rcu/tree.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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);
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index d91c9156fab2..c2ffea31eae8 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -100,7 +100,7 @@ static struct rcu_state rcu_state = {
static bool dump_tree;
module_param(dump_tree, bool, 0444);
/* By default, use RCU_SOFTIRQ instead of rcuc kthreads. */
-static bool use_softirq = 1;
+static bool use_softirq = true;
module_param(use_softirq, bool, 0444);
/* Control rcu_node-tree auto-balancing at boot time. */
static bool rcu_fanout_exact;
--
2.25.1