* [PATCH v2 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
@ 2022-04-23 9:42 Krzysztof Kozlowski
2022-04-23 9:42 ` [PATCH v2 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/aspeed-i2c-ic: " irqchip-bot for Krzysztof Kozlowski
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:42 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>
---
Changes since v1:
1. Correct the return value passed further.
---
drivers/irqchip/irq-aspeed-i2c-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
index a47db16ff960..9c9fc3e2967e 100644
--- a/drivers/irqchip/irq-aspeed-i2c-ic.c
+++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
@@ -77,8 +77,8 @@ 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) {
- ret = i2c_ic->parent_irq;
+ if (!i2c_ic->parent_irq) {
+ ret = -EINVAL;
goto err_iounmap;
}
--
2.32.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
2022-04-23 9:42 [PATCH v2 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
@ 2022-04-23 9:42 ` Krzysztof Kozlowski
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Krzysztof Kozlowski
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/aspeed-i2c-ic: " irqchip-bot for Krzysztof Kozlowski
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:42 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>
---
Changes since v1:
1. Correct the return value passed further.
---
drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 18b77c3e6db4..279e92cf0b16 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -157,8 +157,8 @@ 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) {
- rc = irq;
+ if (!irq) {
+ rc = -EINVAL;
goto err;
}
--
2.32.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [irqchip: irq/irqchip-next] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
2022-04-23 9:42 ` [PATCH v2 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
@ 2022-05-04 16:15 ` irqchip-bot for Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: irqchip-bot for Krzysztof Kozlowski @ 2022-05-04 16:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Krzysztof Kozlowski, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: f03a9670d27d23fe734a456f16e2579b21ec02b4
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f03a9670d27d23fe734a456f16e2579b21ec02b4
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
AuthorDate: Sat, 23 Apr 2022 11:42:27 +02:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 04 May 2022 16:37:48 +01:00
irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220423094227.33148-2-krzysztof.kozlowski@linaro.org
---
drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 18b77c3..279e92c 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -157,8 +157,8 @@ 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) {
- rc = irq;
+ if (!irq) {
+ rc = -EINVAL;
goto err;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [irqchip: irq/irqchip-next] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
2022-04-23 9:42 [PATCH v2 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-23 9:42 ` [PATCH v2 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
@ 2022-05-04 16:15 ` irqchip-bot for Krzysztof Kozlowski
1 sibling, 0 replies; 4+ messages in thread
From: irqchip-bot for Krzysztof Kozlowski @ 2022-05-04 16:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Krzysztof Kozlowski, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 50f0f26e7c8665763d0d7d3372dbcf191f94d077
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/50f0f26e7c8665763d0d7d3372dbcf191f94d077
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
AuthorDate: Sat, 23 Apr 2022 11:42:26 +02:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 04 May 2022 16:37:48 +01:00
irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220423094227.33148-1-krzysztof.kozlowski@linaro.org
---
drivers/irqchip/irq-aspeed-i2c-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
index a47db16..9c9fc3e 100644
--- a/drivers/irqchip/irq-aspeed-i2c-ic.c
+++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
@@ -77,8 +77,8 @@ 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) {
- ret = i2c_ic->parent_irq;
+ if (!i2c_ic->parent_irq) {
+ ret = -EINVAL;
goto err_iounmap;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-04 16:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 9:42 [PATCH v2 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-23 9:42 ` [PATCH v2 2/2] irqchip/aspeed-scu-ic: " Krzysztof Kozlowski
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Krzysztof Kozlowski
2022-05-04 16:15 ` [irqchip: irq/irqchip-next] irqchip/aspeed-i2c-ic: " irqchip-bot for Krzysztof Kozlowski
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®