From: Nicholas Mc Guire <hofrat@osadl.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>,
James Hogan <jhogan@kernel.org>,
David Daney <david.daney@cavium.com>,
"Steven J. Hill" <Steven.Hill@cavium.com>,
Joe Perches <joe@perches.com>,
Colin Ian King <colin.king@canonical.com>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH] MIPS: Octeon: assign bool true/false not 1/0
Date: Sat, 16 Jun 2018 09:26:32 +0200 [thread overview]
Message-ID: <1529133992-15360-1-git-send-email-hofrat@osadl.org> (raw)
Booleans should be assigned true/false not 1/0 as comparison is not needed
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
Problem located by scripts/coccinelle/misc/boolinit.cocci
./arch/mips/cavium-octeon/octeon-irq.c:817:3-13:
WARNING: Assignment of bool to 0/1
Patch was compile tested with: cavium_octeon_defconfig
(with a number of sparse warnings - not related to the proposed change)
Patch is against 4.17.0 (localversion-next is next-20180614)
arch/mips/cavium-octeon/octeon-irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index b3aec10..31be6a9 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -814,7 +814,7 @@ static int octeon_irq_ciu_set_affinity(struct irq_data *data,
pen = &per_cpu(octeon_irq_ciu1_en_mirror, cpu);
if (cpumask_test_cpu(cpu, dest) && enable_one) {
- enable_one = 0;
+ enable_one = false;
__set_bit(cd->bit, pen);
} else {
__clear_bit(cd->bit, pen);
--
2.1.4
next reply other threads:[~2018-06-16 7:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-16 7:26 Nicholas Mc Guire [this message]
2018-06-19 23:28 ` [PATCH] MIPS: Octeon: assign bool true/false not 1/0 Paul Burton
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=1529133992-15360-1-git-send-email-hofrat@osadl.org \
--to=hofrat@osadl.org \
--cc=Steven.Hill@cavium.com \
--cc=colin.king@canonical.com \
--cc=david.daney@cavium.com \
--cc=jhogan@kernel.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
/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).