* [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
@ 2022-04-22 10:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:47 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vincent Cuissard, Samuel Ortiz, linux-nfc,
netdev, linux-kernel
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi@zte.com.cn/
---
drivers/nfc/nfcmrvl/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/nfcmrvl/spi.c b/drivers/nfc/nfcmrvl/spi.c
index a38e2fcdfd39..01f0a08a381c 100644
--- a/drivers/nfc/nfcmrvl/spi.c
+++ b/drivers/nfc/nfcmrvl/spi.c
@@ -115,7 +115,7 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node,
}
ret = irq_of_parse_and_map(node, 0);
- if (ret < 0) {
+ if (!ret) {
pr_err("Unable to get irq, error: %d\n", ret);
return ret;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [linux-nfc] [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
@ 2022-04-22 10:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:47 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vincent Cuissard, Samuel Ortiz, linux-nfc,
netdev, linux-kernel
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi@zte.com.cn/
---
drivers/nfc/nfcmrvl/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/nfcmrvl/spi.c b/drivers/nfc/nfcmrvl/spi.c
index a38e2fcdfd39..01f0a08a381c 100644
--- a/drivers/nfc/nfcmrvl/spi.c
+++ b/drivers/nfc/nfcmrvl/spi.c
@@ -115,7 +115,7 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node,
}
ret = irq_of_parse_and_map(node, 0);
- if (ret < 0) {
+ if (!ret) {
pr_err("Unable to get irq, error: %d\n", ret);
return ret;
}
--
2.32.0
_______________________________________________
Linux-nfc mailing list -- linux-nfc@lists.01.org
To unsubscribe send an email to linux-nfc-leave@lists.01.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
@ 2022-04-22 10:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:47 UTC (permalink / raw)
To: linux-nfc
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi(a)zte.com.cn/
---
drivers/nfc/nfcmrvl/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/nfcmrvl/spi.c b/drivers/nfc/nfcmrvl/spi.c
index a38e2fcdfd39..01f0a08a381c 100644
--- a/drivers/nfc/nfcmrvl/spi.c
+++ b/drivers/nfc/nfcmrvl/spi.c
@@ -115,7 +115,7 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node,
}
ret = irq_of_parse_and_map(node, 0);
- if (ret < 0) {
+ if (!ret) {
pr_err("Unable to get irq, error: %d\n", ret);
return ret;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
2022-04-22 10:47 ` [linux-nfc] " Krzysztof Kozlowski
(?)
(?)
@ 2022-04-22 23:13 ` Jakub Kicinski
2022-04-23 9:28 ` [linux-nfc] " Krzysztof Kozlowski
-1 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2022-04-22 23:13 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vincent Cuissard, Samuel Ortiz, linux-nfc, netdev, linux-kernel
On Fri, 22 Apr 2022 12:47:58 +0200 Krzysztof Kozlowski wrote:
> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>
> Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi@zte.com.cn/
Maybe send one patch that fixes both and also fixes the usage of ret?
> diff --git a/drivers/nfc/nfcmrvl/spi.c b/drivers/nfc/nfcmrvl/spi.c
> index a38e2fcdfd39..01f0a08a381c 100644
> --- a/drivers/nfc/nfcmrvl/spi.c
> +++ b/drivers/nfc/nfcmrvl/spi.c
> @@ -115,7 +115,7 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node,
> }
>
> ret = irq_of_parse_and_map(node, 0);
> - if (ret < 0) {
> + if (!ret) {
> pr_err("Unable to get irq, error: %d\n", ret);
> return ret;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
2022-04-22 23:13 ` Jakub Kicinski
2022-04-23 9:28 ` [linux-nfc] " Krzysztof Kozlowski
@ 2022-04-23 9:28 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:28 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Vincent Cuissard, Samuel Ortiz, linux-nfc, netdev, linux-kernel
On 23/04/2022 01:13, Jakub Kicinski wrote:
> On Fri, 22 Apr 2022 12:47:58 +0200 Krzysztof Kozlowski wrote:
>> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>>
>> Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi@zte.com.cn/
>
> Maybe send one patch that fixes both and also fixes the usage of ret?
Bah, I just blindly copied one part of his patch without deeper check.
Thanks for noticing it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* [linux-nfc] Re: [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
@ 2022-04-23 9:28 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:28 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: linux-nfc, netdev, linux-kernel
On 23/04/2022 01:13, Jakub Kicinski wrote:
> On Fri, 22 Apr 2022 12:47:58 +0200 Krzysztof Kozlowski wrote:
>> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>>
>> Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi@zte.com.cn/
>
> Maybe send one patch that fixes both and also fixes the usage of ret?
Bah, I just blindly copied one part of his patch without deeper check.
Thanks for noticing it.
Best regards,
Krzysztof
_______________________________________________
Linux-nfc mailing list -- linux-nfc@lists.01.org
To unsubscribe send an email to linux-nfc-leave@lists.01.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value
@ 2022-04-23 9:28 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-23 9:28 UTC (permalink / raw)
To: linux-nfc
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
On 23/04/2022 01:13, Jakub Kicinski wrote:
> On Fri, 22 Apr 2022 12:47:58 +0200 Krzysztof Kozlowski wrote:
>> The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
>>
>> Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> This is another issue to https://lore.kernel.org/all/20220422084605.2775542-1-lv.ruyi(a)zte.com.cn/
>
> Maybe send one patch that fixes both and also fixes the usage of ret?
Bah, I just blindly copied one part of his patch without deeper check.
Thanks for noticing it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-23 9:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 10:47 [PATCH] nfc: nfcmrvl: spi: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-22 10:47 ` Krzysztof Kozlowski
2022-04-22 10:47 ` [linux-nfc] " Krzysztof Kozlowski
2022-04-22 23:13 ` Jakub Kicinski
2022-04-23 9:28 ` Krzysztof Kozlowski
2022-04-23 9:28 ` Krzysztof Kozlowski
2022-04-23 9:28 ` [linux-nfc] " Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.