Linux-csky Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] irqchip/csky: Use true and false for bool variable
@ 2021-02-09 10:07 Jiapeng Chong
  2021-02-09 15:58 ` Guo Ren
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-02-09 10:07 UTC (permalink / raw)
  To: tglx; +Cc: maz, guoren, linux-kernel, linux-csky, 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.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 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 5a2ec43..5e18ba9 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] 2+ messages in thread

* Re: [PATCH] irqchip/csky: Use true and false for bool variable
  2021-02-09 10:07 [PATCH] irqchip/csky: Use true and false for bool variable Jiapeng Chong
@ 2021-02-09 15:58 ` Guo Ren
  0 siblings, 0 replies; 2+ messages in thread
From: Guo Ren @ 2021-02-09 15:58 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: Thomas Gleixner, Marc Zyngier, Linux Kernel Mailing List, linux-csky

Looks good to me, thx.

On Tue, Feb 9, 2021 at 6:08 PM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> 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.
>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  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 5a2ec43..5e18ba9 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
>


-- 
Best Regards
 Guo Ren

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 10:07 [PATCH] irqchip/csky: Use true and false for bool variable Jiapeng Chong
2021-02-09 15:58 ` Guo Ren

Linux-csky Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-csky/0 linux-csky/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-csky linux-csky/ https://lore.kernel.org/linux-csky \
		linux-csky@vger.kernel.org
	public-inbox-index linux-csky

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-csky


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git