2020-08-26 03:57:13

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] irqchip/ti-sci-intr: Fix unsigned comparison to zero

ti_sci_intr_xlate_irq() return -ENOENT on fail, p_hwirq
should be int type.

Fixes: a5b659bd4bc7 ("irqchip/ti-sci-intr: Add support for INTR being a parent to INTR")
Signed-off-by: YueHaibing <[email protected]>
---
drivers/irqchip/irq-ti-sci-intr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
index cbc1758228d9..85a72b56177c 100644
--- a/drivers/irqchip/irq-ti-sci-intr.c
+++ b/drivers/irqchip/irq-ti-sci-intr.c
@@ -137,8 +137,8 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain,
struct ti_sci_intr_irq_domain *intr = domain->host_data;
struct device_node *parent_node;
struct irq_fwspec fwspec;
- u16 out_irq, p_hwirq;
- int err = 0;
+ int p_hwirq, err = 0;
+ u16 out_irq;

out_irq = ti_sci_get_free_resource(intr->out_irqs);
if (out_irq == TI_SCI_RESOURCE_NULL)
--
2.20.1



2020-08-26 03:59:15

by Lokesh Vutla

[permalink] [raw]
Subject: Re: [PATCH -next] irqchip/ti-sci-intr: Fix unsigned comparison to zero



On 26/08/20 9:23 am, YueHaibing wrote:
> ti_sci_intr_xlate_irq() return -ENOENT on fail, p_hwirq
> should be int type.
>
> Fixes: a5b659bd4bc7 ("irqchip/ti-sci-intr: Add support for INTR being a parent to INTR")
> Signed-off-by: YueHaibing <[email protected]>

Thanks for the patch.

Acked-by: Lokesh Vutla <[email protected]>

Thanks and regards,
Lokesh

> ---
> drivers/irqchip/irq-ti-sci-intr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
> index cbc1758228d9..85a72b56177c 100644
> --- a/drivers/irqchip/irq-ti-sci-intr.c
> +++ b/drivers/irqchip/irq-ti-sci-intr.c
> @@ -137,8 +137,8 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain,
> struct ti_sci_intr_irq_domain *intr = domain->host_data;
> struct device_node *parent_node;
> struct irq_fwspec fwspec;
> - u16 out_irq, p_hwirq;
> - int err = 0;
> + int p_hwirq, err = 0;
> + u16 out_irq;
>
> out_irq = ti_sci_get_free_resource(intr->out_irqs);
> if (out_irq == TI_SCI_RESOURCE_NULL)
>

2020-09-13 15:21:46

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH -next] irqchip/ti-sci-intr: Fix unsigned comparison to zero

On Wed, 26 Aug 2020 11:53:21 +0800, YueHaibing wrote:
> ti_sci_intr_xlate_irq() return -ENOENT on fail, p_hwirq
> should be int type.

Applied to irq/irqchip-fixes-5.9, thanks!

[1/1] irqchip/ti-sci-intr: Fix unsigned comparison to zero
commit: 8ddf1905a904ca86d71ca1c435e4b0b2a0b70df8

Cheers,

M.
--
Without deviation from the norm, progress is not possible.


2020-10-11 18:14:27

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: irq/core] irqchip/ti-sci-intr: Fix unsigned comparison to zero

The following commit has been merged into the irq/core branch of tip:

Commit-ID: 8ddf1905a904ca86d71ca1c435e4b0b2a0b70df8
Gitweb: https://git.kernel.org/tip/8ddf1905a904ca86d71ca1c435e4b0b2a0b70df8
Author: YueHaibing <[email protected]>
AuthorDate: Wed, 26 Aug 2020 11:53:21 +08:00
Committer: Marc Zyngier <[email protected]>
CommitterDate: Sun, 13 Sep 2020 15:30:00 +01:00

irqchip/ti-sci-intr: Fix unsigned comparison to zero

ti_sci_intr_xlate_irq() return -ENOENT on fail, p_hwirq
should be int type.

Fixes: a5b659bd4bc7 ("irqchip/ti-sci-intr: Add support for INTR being a parent to INTR")
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Acked-by: Lokesh Vutla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/irqchip/irq-ti-sci-intr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
index cbc1758..85a72b5 100644
--- a/drivers/irqchip/irq-ti-sci-intr.c
+++ b/drivers/irqchip/irq-ti-sci-intr.c
@@ -137,8 +137,8 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain,
struct ti_sci_intr_irq_domain *intr = domain->host_data;
struct device_node *parent_node;
struct irq_fwspec fwspec;
- u16 out_irq, p_hwirq;
- int err = 0;
+ int p_hwirq, err = 0;
+ u16 out_irq;

out_irq = ti_sci_get_free_resource(intr->out_irqs);
if (out_irq == TI_SCI_RESOURCE_NULL)