mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqchip: Return true/false (not 1/0) from bool functions
@ 2022-03-17  3:21 Haowen Bai
  2022-03-17 15:40 ` Guo Ren
  2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/csky: " irqchip-bot for Haowen Bai
  0 siblings, 2 replies; 3+ messages in thread
From: Haowen Bai @ 2022-03-17  3:21 UTC (permalink / raw)
  To: tglx, maz, guoren; +Cc: linux-kernel, linux-csky, Haowen Bai

Return boolean values ("true" or "false") instead of 1 or 0 from bool
functions.

Signed-off-by: Haowen Bai <baihaowen@meizu.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 d36f536..42d8a24 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;
 
 	generic_handle_domain_irq(root_domain, irq_base + __fls(hwirq));
 
-	return 1;
+	return true;
 }
 
 /* gx6605s 64 irqs interrupt controller */
-- 
2.7.4


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

* Re: [PATCH] irqchip: Return true/false (not 1/0) from bool functions
  2022-03-17  3:21 [PATCH] irqchip: Return true/false (not 1/0) from bool functions Haowen Bai
@ 2022-03-17 15:40 ` Guo Ren
  2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/csky: " irqchip-bot for Haowen Bai
  1 sibling, 0 replies; 3+ messages in thread
From: Guo Ren @ 2022-03-17 15:40 UTC (permalink / raw)
  To: Haowen Bai
  Cc: Thomas Gleixner, Marc Zyngier, Linux Kernel Mailing List, linux-csky

It's my coding conventions' problem, thx for pointing out.

Acked-by: Guo Ren <guoren@kernel.org>

On Thu, Mar 17, 2022 at 11:21 AM Haowen Bai <baihaowen@meizu.com> wrote:
>
> Return boolean values ("true" or "false") instead of 1 or 0 from bool
> functions.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.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 d36f536..42d8a24 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;
>
>         generic_handle_domain_irq(root_domain, irq_base + __fls(hwirq));
>
> -       return 1;
> +       return true;
>  }
>
>  /* gx6605s 64 irqs interrupt controller */
> --
> 2.7.4
>


-- 
Best Regards
 Guo Ren

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

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

* [irqchip: irq/irqchip-next] irqchip/csky: Return true/false (not 1/0) from bool functions
  2022-03-17  3:21 [PATCH] irqchip: Return true/false (not 1/0) from bool functions Haowen Bai
  2022-03-17 15:40 ` Guo Ren
@ 2022-05-04 16:15 ` irqchip-bot for Haowen Bai
  1 sibling, 0 replies; 3+ messages in thread
From: irqchip-bot for Haowen Bai @ 2022-05-04 16:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Haowen Bai, Guo Ren, Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     0c16e931a735500f15db74916db56c698d8ff735
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/0c16e931a735500f15db74916db56c698d8ff735
Author:        Haowen Bai <baihaowen@meizu.com>
AuthorDate:    Thu, 17 Mar 2022 11:21:24 +08:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 04 May 2022 16:49:47 +01:00

irqchip/csky: Return true/false (not 1/0) from bool functions

Return boolean values ("true" or "false") instead of 1 or 0 from bool
functions.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1647487284-30088-1-git-send-email-baihaowen@meizu.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 d36f536..42d8a24 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;
 
 	generic_handle_domain_irq(root_domain, irq_base + __fls(hwirq));
 
-	return 1;
+	return true;
 }
 
 /* gx6605s 64 irqs interrupt controller */

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

end of thread, other threads:[~2022-05-04 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17  3:21 [PATCH] irqchip: Return true/false (not 1/0) from bool functions Haowen Bai
2022-03-17 15:40 ` Guo Ren
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/csky: " irqchip-bot for Haowen Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®