lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210824061646.59320-1-deng.changcheng@zte.com.cn>
Date:   Mon, 23 Aug 2021 23:16:46 -0700
From:   CGEL <cgel.zte@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Marc Zyngier <maz@...nel.org>, Guo Ren <guoren@...nel.org>,
        linux-kernel@...r.kernel.org, linux-csky@...r.kernel.org,
        Jing Yangyang <jing.yangyang@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] irqchip: fix boolreturn.cocci warnings

From: Jing Yangyang <jing.yangyang@....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@....com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@....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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ