* [PATCH] MIPS: Octeon: assign bool true/false not 1/0
@ 2018-06-16 7:26 Nicholas Mc Guire
2018-06-19 23:28 ` Paul Burton
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Mc Guire @ 2018-06-16 7:26 UTC (permalink / raw)
To: Ralf Baechle
Cc: Paul Burton, James Hogan, David Daney, Steven J. Hill,
Joe Perches, Colin Ian King, linux-mips, linux-kernel,
Nicholas Mc Guire
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Octeon: assign bool true/false not 1/0
2018-06-16 7:26 [PATCH] MIPS: Octeon: assign bool true/false not 1/0 Nicholas Mc Guire
@ 2018-06-19 23:28 ` Paul Burton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2018-06-19 23:28 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Ralf Baechle, James Hogan, David Daney, Steven J. Hill,
Joe Perches, Colin Ian King, linux-mips, linux-kernel
Hi Nicholas,
On Sat, Jun 16, 2018 at 09:26:32AM +0200, Nicholas Mc Guire wrote:
> 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(-)
Thanks, applied to mips-next for 4.19.
Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-19 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-16 7:26 [PATCH] MIPS: Octeon: assign bool true/false not 1/0 Nicholas Mc Guire
2018-06-19 23:28 ` Paul Burton
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).