LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH linux-next] irqchip: fix boolreturn.cocci warnings
@ 2021-08-24  6:16 CGEL
  0 siblings, 0 replies; only message in thread
From: CGEL @ 2021-08-24  6:16 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Marc Zyngier, Guo Ren, linux-kernel, linux-csky, Jing Yangyang,
	Zeal Robot

From: Jing Yangyang <jing.yangyang@zte.com.cn>

./drivers/irqchip/irq-csky-apb-intc.c:139:9-10:WARNING:return of 0/1 in
function 'handle_irq_perbit' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 drivers/irqchip/irq-csky-apb-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky-apb-intc.c
index ab91afa..5d044ad 100644
--- a/drivers/irqchip/irq-csky-apb-intc.c
+++ b/drivers/irqchip/irq-csky-apb-intc.c
@@ -136,11 +136,11 @@ static inline bool handle_irq_perbit(struct pt_regs *regs, u32 hwirq,
 				     u32 irq_base)
 {
 	if (hwirq == 0)
-		return 0;
+		return false;
 
 	handle_domain_irq(root_domain, irq_base + __fls(hwirq), regs);
 
-	return 1;
+	return true;
 }
 
 /* gx6605s 64 irqs interrupt controller */
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-24  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  6:16 [PATCH linux-next] irqchip: fix boolreturn.cocci warnings CGEL

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).