linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: julia.lawall@lip6.fr, boqun.feng@gmail.com,
	Thomas Gleixner <tglx@linutronix.de>,
	Jiri Kosina <jkosina@suse.cz>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Eiichi Tsukata <devel@etsukata.com>,
	Tyler Hicks <tyhicks@canonical.com>
Subject: [PATCH v2 1/4] cpu: Remove Comparison to bool
Date: Mon, 30 Mar 2020 02:24:47 +0100	[thread overview]
Message-ID: <20200330012450.312155-2-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200330012450.312155-1-jbi.octave@gmail.com>

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


  reply	other threads:[~2020-03-30  1:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/4>
2020-03-30  1:24 ` [PATCH v2 0/4] Coccinelle cleanups Jules Irenge
2020-03-30  1:24   ` Jules Irenge [this message]
2020-03-30  1:24   ` [PATCH v2 2/4] rcu: Replace 1 by true Jules Irenge
2020-03-30 21:16     ` Paul E. McKenney
2020-03-30  1:24   ` [PATCH v2 3/4] genirq: " Jules Irenge
2020-03-30  1:24   ` [PATCH v2 4/4] locking/rtmutex: Remove Comparison to bool Jules Irenge
2020-03-30 11:21     ` Peter Zijlstra
2020-04-03 16:17       ` Jules Irenge
2020-08-01 18:45 ` [PATCH 0/4] Checkpatch tool errors clean up Jules Irenge
2020-08-01 18:46   ` [PATCH 1/4] acct: Add required space between variable and operator Jules Irenge
2020-08-01 18:46   ` [PATCH 2/4] audit: uninitialize global variable audit_sig_sid Jules Irenge
2020-08-01 18:55     ` Joe Perches
2020-08-01 20:26       ` Paul Moore
2020-08-02 14:32       ` Jules Irenge
2020-08-01 18:46   ` [PATCH 3/4] audit: uninitialize static variables Jules Irenge
2020-08-01 20:21     ` Paul Moore
2020-08-01 18:46   ` [PATCH 4/4] context_tracking: " Jules Irenge
2020-08-03  9:37     ` peterz
2020-08-03 10:27       ` Jules Irenge
2020-08-01 19:07   ` [PATCH 0/4] Checkpatch tool errors clean up Joe Perches
2020-08-02 14:54     ` 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=20200330012450.312155-2-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=devel@etsukata.com \
    --cc=jkosina@suse.cz \
    --cc=jpoimboe@redhat.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tyhicks@canonical.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).