* [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
@ 2022-04-22 10:45 Krzysztof Kozlowski
2022-04-22 10:45 ` [PATCH 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
2022-04-23 9:30 ` [PATCH 1/2] irqchip/aspeed-i2c-ic: " Krzysztof Kozlowski
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:45 UTC (permalink / raw)
To: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Thomas Gleixner, Marc Zyngier, Andrew Jeffery, Eddie James,
linux-i2c, openbmc, linux-kernel, linux-arm-kernel, linux-aspeed
Cc: Krzysztof Kozlowski
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: f48e699ddf70 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/irqchip/irq-aspeed-i2c-ic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
index a47db16ff960..cef1291ae783 100644
--- a/drivers/irqchip/irq-aspeed-i2c-ic.c
+++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
@@ -77,7 +77,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
}
i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
- if (i2c_ic->parent_irq < 0) {
+ if (!i2c_ic->parent_irq) {
ret = i2c_ic->parent_irq;
goto err_iounmap;
}
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
2022-04-22 10:45 [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
@ 2022-04-22 10:45 ` Krzysztof Kozlowski
2022-04-23 9:30 ` [PATCH 1/2] irqchip/aspeed-i2c-ic: " Krzysztof Kozlowski
1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:45 UTC (permalink / raw)
To: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Thomas Gleixner, Marc Zyngier, Andrew Jeffery, Eddie James,
linux-i2c, openbmc, linux-kernel, linux-arm-kernel, linux-aspeed
Cc: Krzysztof Kozlowski
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/irqchip/irq-aspeed-scu-ic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 18b77c3e6db4..9cf67541828f 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -157,7 +157,7 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
}
irq = irq_of_parse_and_map(node, 0);
- if (irq < 0) {
+ if (!irq) {
rc = irq;
goto err;
}
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
2022-04-22 10:45 [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-22 10:45 ` [PATCH 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
@ 2022-04-23 9:30 ` Krzysztof Kozlowski
2022-04-23 9:43 ` Marc Zyngier
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:30 UTC (permalink / raw)
To: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Thomas Gleixner, Marc Zyngier, Andrew Jeffery, Eddie James,
linux-i2c, openbmc, linux-kernel, linux-arm-kernel, linux-aspeed
On 22/04/2022 12:45, Krzysztof Kozlowski wrote:
> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>
> Fixes: f48e699ddf70 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/irqchip/irq-aspeed-i2c-ic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
> index a47db16ff960..cef1291ae783 100644
> --- a/drivers/irqchip/irq-aspeed-i2c-ic.c
> +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
> @@ -77,7 +77,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
> }
>
> i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
> - if (i2c_ic->parent_irq < 0) {
> + if (!i2c_ic->parent_irq) {
> ret = i2c_ic->parent_irq;
This is wrong (same in patch 2). I will send a v2.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
2022-04-23 9:30 ` [PATCH 1/2] irqchip/aspeed-i2c-ic: " Krzysztof Kozlowski
@ 2022-04-23 9:43 ` Marc Zyngier
0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2022-04-23 9:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Thomas Gleixner, Andrew Jeffery, Eddie James, linux-i2c, openbmc,
linux-kernel, linux-arm-kernel, linux-aspeed
On Sat, 23 Apr 2022 10:30:53 +0100,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
> On 22/04/2022 12:45, Krzysztof Kozlowski wrote:
> > The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
> >
> > Fixes: f48e699ddf70 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed")
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > ---
> > drivers/irqchip/irq-aspeed-i2c-ic.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
> > index a47db16ff960..cef1291ae783 100644
> > --- a/drivers/irqchip/irq-aspeed-i2c-ic.c
> > +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
> > @@ -77,7 +77,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
> > }
> >
> > i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
> > - if (i2c_ic->parent_irq < 0) {
> > + if (!i2c_ic->parent_irq) {
> > ret = i2c_ic->parent_irq;
>
> This is wrong (same in patch 2). I will send a v2.
While you're at it, please add a cover letter when sending a series
containing more than a single patch.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-23 9:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 10:45 [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-22 10:45 ` [PATCH 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
2022-04-23 9:30 ` [PATCH 1/2] irqchip/aspeed-i2c-ic: " Krzysztof Kozlowski
2022-04-23 9:43 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).