linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: julia.lawall@lip6.fr
Cc: boqun.feng@gmail.com, Jules Irenge <jbi.octave@example.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Jiri Kosina <jkosina@suse.cz>, Ingo Molnar <mingo@kernel.org>,
	Vitaly Kuznetsov <vkuznets@redhat.com>, Qian Cai <cai@lca.pw>,
	Arnd Bergmann <arnd@arndb.de>,
	Tyler Hicks <tyhicks@canonical.com>,
	linux-kernel@vger.kernel.org (open list),
	rcu@vger.kernel.org (open list:READ-COPY UPDATE (RCU))
Subject: [PATCH 03/10] cpu: Remove Comparison to bool
Date: Fri, 27 Mar 2020 21:23:50 +0000	[thread overview]
Message-ID: <20200327212358.5752-4-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200327212358.5752-1-jbi.octave@gmail.com>

From: Jules Irenge <jbi.octave@example.com>

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@gmail.com>
---
 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


  parent reply	other threads:[~2020-03-27 21:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/10>
     [not found] ` <20200327212358.5752-1-jbi.octave@gmail.com>
2020-03-27 21:23   ` [PATCH 01/10] locking/rtmutex: Remove Comparison to bool Jules Irenge
2020-03-28 11:28     ` Thomas Gleixner
2020-03-28 12:02       ` Jules Irenge
2020-03-28 12:44         ` Thomas Gleixner
2020-03-27 21:23   ` [PATCH 02/10] sched/topology: Replace 1 and 0 by boolean value Jules Irenge
2020-03-30 11:27     ` Peter Zijlstra
2020-04-03 16:23       ` Jules Irenge
2020-03-27 21:23   ` Jules Irenge [this message]
2020-03-28 11:29     ` [PATCH 03/10] cpu: Remove Comparison to bool Thomas Gleixner
2020-03-27 21:23   ` [PATCH 04/10] irq: Replace 1 by true Jules Irenge
2020-03-27 21:23   ` [PATCH 05/10] softirq: Replace BUG() after if statement with BUG_ON Jules Irenge
2020-03-28 11:22     ` Thomas Gleixner
2020-03-27 21:23   ` [PATCH 06/10] rcu: Replace assigned pointer ret value by corresponding boolean value Jules Irenge
2020-03-30 21:12     ` Paul E. McKenney
2020-03-27 21:23   ` [PATCH 07/10] sched/fair: Replace 1 and 0 by " Jules Irenge
2020-03-30 11:29     ` Peter Zijlstra
2020-03-27 21:23   ` [PATCH 08/10] trace: Replace printk and WARN_ON with WARN Jules Irenge
2020-03-27 21:23   ` [PATCH 09/10] kernel/sysctl.c: Replace 1 and 0 by corresponding boolean value Jules Irenge
2020-03-28 21:24     ` Kees Cook
2020-03-27 21:23   ` [PATCH 10/10] trace: Replace printk and WARN_ON with WARN Jules Irenge
2020-03-27 22:51     ` Steven Rostedt
2020-03-28 12:00       ` Jules Irenge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327212358.5752-4-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=cai@lca.pw \
    --cc=jbi.octave@example.com \
    --cc=jiangshanlai@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=jpoimboe@redhat.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tyhicks@canonical.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).