Skip to contentSkip to conversation

irqchip/csky: Use true and false for bool variable

PATCH In review Jiapeng Chong 2 participants 2 messages Feb 9, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/csky: Use true and false for bool variable

Fix the following coccicheck warning:

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

---
 drivers/irqchip/irq-csky-apb-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-csky-apb-intc.c +2 -2
index 5a2ec43..5e18ba9 100644
@@ -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 */
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw

Looks good to me, thx.

Quoted 33 lines · Jiapeng Chong

Fix the following coccicheck warning:

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

---
 drivers/irqchip/irq-csky-apb-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-csky-apb-intc.c +2 -3
index 5a2ec43..5e18ba9 100644
@@ -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

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/