linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] pinctrl: mvebu: Fix irq_of_parse_and_map() return value
@ 2022-04-23  9:41 Krzysztof Kozlowski
  2022-04-23  9:41 ` [PATCH v2 2/2] pinctrl: nuvoton: " Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23  9:41 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, linux-arm-kernel,
	linux-gpio, linux-kernel, openbmc
  Cc: Krzysztof Kozlowski

The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes since v1:
1. None.
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index ef4118e49f16..a140b6bfbfaa 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -764,7 +764,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev,
 	for (i = 0; i < nr_irq_parent; i++) {
 		int irq = irq_of_parse_and_map(np, i);
 
-		if (irq < 0)
+		if (!irq)
 			continue;
 		girq->parents[i] = irq;
 	}
-- 
2.32.0


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

* [PATCH v2 2/2] pinctrl: nuvoton: Fix irq_of_parse_and_map() return value
  2022-04-23  9:41 [PATCH v2 1/2] pinctrl: mvebu: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
@ 2022-04-23  9:41 ` Krzysztof Kozlowski
  2022-04-28 22:52   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23  9:41 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, linux-arm-kernel,
	linux-gpio, linux-kernel, openbmc
  Cc: Krzysztof Kozlowski

The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes since v1:
1. Correct the return value passed further.
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 3cf0f8a43c37..cc085ba2d7e4 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1898,9 +1898,9 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl)
 		}
 
 		ret = irq_of_parse_and_map(np, 0);
-		if (ret < 0) {
+		if (!ret) {
 			dev_err(dev, "No IRQ for GPIO bank %u\n", id);
-			return ret;
+			return -EINVAL;
 		}
 		pctrl->gpio_bank[id].irq = ret;
 		pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip;
-- 
2.32.0


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

* Re: [PATCH v2 2/2] pinctrl: nuvoton: Fix irq_of_parse_and_map() return value
  2022-04-23  9:41 ` [PATCH v2 2/2] pinctrl: nuvoton: " Krzysztof Kozlowski
@ 2022-04-28 22:52   ` Linus Walleij
  2022-04-29  6:03     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2022-04-28 22:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, linux-arm-kernel, linux-gpio, linux-kernel,
	openbmc

On Sat, Apr 23, 2022 at 11:41 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>
> Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Changes since v1:
> 1. Correct the return value passed further.

This doesn't apply to my tree neither for fixes or devel, can you rebase it?
I'd like to queue it on devel for non-urgent fixes.

Yours,
Linus Walleij

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

* Re: [PATCH v2 2/2] pinctrl: nuvoton: Fix irq_of_parse_and_map() return value
  2022-04-28 22:52   ` Linus Walleij
@ 2022-04-29  6:03     ` Krzysztof Kozlowski
  2022-04-29 12:52       ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-29  6:03 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, linux-arm-kernel, linux-gpio, linux-kernel,
	openbmc, Andy Shevchenko

On 29/04/2022 00:52, Linus Walleij wrote:
> On Sat, Apr 23, 2022 at 11:41 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> 
>> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>>
>> Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Changes since v1:
>> 1. Correct the return value passed further.
> 
> This doesn't apply to my tree neither for fixes or devel, can you rebase it?
> I'd like to queue it on devel for non-urgent fixes.

Sure, I will rebase. The issue was because of Andy's commit
https://lore.kernel.org/all/20220401103604.8705-9-andriy.shevchenko@linux.intel.com/
which was in next but not in your tree.

Including such development branches in next, bypassing maintainer, makes
it difficult for everyone else to develop patches... :(


Best regards,
Krzysztof

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

* Re: [PATCH v2 2/2] pinctrl: nuvoton: Fix irq_of_parse_and_map() return value
  2022-04-29  6:03     ` Krzysztof Kozlowski
@ 2022-04-29 12:52       ` Andy Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2022-04-29 12:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, linux-arm-kernel,
	linux-gpio, linux-kernel, openbmc

On Fri, Apr 29, 2022 at 08:03:19AM +0200, Krzysztof Kozlowski wrote:
> On 29/04/2022 00:52, Linus Walleij wrote:
> > On Sat, Apr 23, 2022 at 11:41 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> > 
> >> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
> >>
> >> Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> Changes since v1:
> >> 1. Correct the return value passed further.
> > 
> > This doesn't apply to my tree neither for fixes or devel, can you rebase it?
> > I'd like to queue it on devel for non-urgent fixes.
> 
> Sure, I will rebase. The issue was because of Andy's commit
> https://lore.kernel.org/all/20220401103604.8705-9-andriy.shevchenko@linux.intel.com/
> which was in next but not in your tree.
> 
> Including such development branches in next, bypassing maintainer, makes
> it difficult for everyone else to develop patches... :(

I'm about to send PR with my stuff to Linus and Bart, but I have difficulties
right now with the signing tag. I hope I figure out sooner than later.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2022-04-29 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23  9:41 [PATCH v2 1/2] pinctrl: mvebu: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-23  9:41 ` [PATCH v2 2/2] pinctrl: nuvoton: " Krzysztof Kozlowski
2022-04-28 22:52   ` Linus Walleij
2022-04-29  6:03     ` Krzysztof Kozlowski
2022-04-29 12:52       ` Andy Shevchenko

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).