* [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
@ 2022-10-06 5:29 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-10-06 5:29 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
Cc: Christophe Leroy, linux-kernel, linux-mtd
NO_IRQ is used to check the return of irq_of_parse_and_map().
On some architecture NO_IRQ is 0, on other architectures it is -1.
irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
So use 0 instead of using NO_IRQ.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
index 800d774aed8e..f68349cb7824 100644
--- a/drivers/mtd/nand/raw/mpc5121_nfc.c
+++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
@@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
}
prv->irq = irq_of_parse_and_map(dn, 0);
- if (prv->irq == NO_IRQ) {
+ if (!prv->irq) {
dev_err(dev, "Error mapping IRQ!\n");
return -EINVAL;
}
--
2.37.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
@ 2022-10-06 5:29 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-10-06 5:29 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
Cc: Christophe Leroy, linux-kernel, linux-mtd
NO_IRQ is used to check the return of irq_of_parse_and_map().
On some architecture NO_IRQ is 0, on other architectures it is -1.
irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
So use 0 instead of using NO_IRQ.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
index 800d774aed8e..f68349cb7824 100644
--- a/drivers/mtd/nand/raw/mpc5121_nfc.c
+++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
@@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
}
prv->irq = irq_of_parse_and_map(dn, 0);
- if (prv->irq == NO_IRQ) {
+ if (!prv->irq) {
dev_err(dev, "Error mapping IRQ!\n");
return -EINVAL;
}
--
2.37.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
2022-10-06 5:29 ` Christophe Leroy
@ 2022-10-06 7:47 ` Miquel Raynal
-1 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2022-10-06 7:47 UTC (permalink / raw)
To: Christophe Leroy
Cc: Richard Weinberger, Vignesh Raghavendra, linux-kernel, linux-mtd
Hi Christophe,
christophe.leroy@csgroup.eu wrote on Thu, 6 Oct 2022 07:29:12 +0200:
> NO_IRQ is used to check the return of irq_of_parse_and_map().
>
> On some architecture NO_IRQ is 0, on other architectures it is -1.
>
> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>
> So use 0 instead of using NO_IRQ.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Deserves Fixes and Cc:stable tags, isn't it?
> ---
> drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
> index 800d774aed8e..f68349cb7824 100644
> --- a/drivers/mtd/nand/raw/mpc5121_nfc.c
> +++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
> @@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
> }
>
> prv->irq = irq_of_parse_and_map(dn, 0);
> - if (prv->irq == NO_IRQ) {
> + if (!prv->irq) {
> dev_err(dev, "Error mapping IRQ!\n");
> return -EINVAL;
> }
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
@ 2022-10-06 7:47 ` Miquel Raynal
0 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2022-10-06 7:47 UTC (permalink / raw)
To: Christophe Leroy
Cc: Richard Weinberger, Vignesh Raghavendra, linux-kernel, linux-mtd
Hi Christophe,
christophe.leroy@csgroup.eu wrote on Thu, 6 Oct 2022 07:29:12 +0200:
> NO_IRQ is used to check the return of irq_of_parse_and_map().
>
> On some architecture NO_IRQ is 0, on other architectures it is -1.
>
> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>
> So use 0 instead of using NO_IRQ.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Deserves Fixes and Cc:stable tags, isn't it?
> ---
> drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
> index 800d774aed8e..f68349cb7824 100644
> --- a/drivers/mtd/nand/raw/mpc5121_nfc.c
> +++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
> @@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
> }
>
> prv->irq = irq_of_parse_and_map(dn, 0);
> - if (prv->irq == NO_IRQ) {
> + if (!prv->irq) {
> dev_err(dev, "Error mapping IRQ!\n");
> return -EINVAL;
> }
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
2022-10-06 7:47 ` Miquel Raynal
@ 2022-10-06 8:18 ` Christophe Leroy
-1 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-10-06 8:18 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Vignesh Raghavendra, linux-kernel, linux-mtd
Hi Miquel
Le 06/10/2022 à 09:47, Miquel Raynal a écrit :
> Hi Christophe,
>
> christophe.leroy@csgroup.eu wrote on Thu, 6 Oct 2022 07:29:12 +0200:
>
>> NO_IRQ is used to check the return of irq_of_parse_and_map().
>>
>> On some architecture NO_IRQ is 0, on other architectures it is -1.
>>
>> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>>
>> So use 0 instead of using NO_IRQ.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>
> Deserves Fixes and Cc:stable tags, isn't it?
I don't think so, because the only user today is powerpc which defines
NO_IRQ as 0.
In the stable-kernel-rules.rst it is said:
- It must fix a real bug that bothers people (not a, "This could be a
problem..." type thing).
>
>> ---
>> drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
>> index 800d774aed8e..f68349cb7824 100644
>> --- a/drivers/mtd/nand/raw/mpc5121_nfc.c
>> +++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
>> @@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
>> }
>>
>> prv->irq = irq_of_parse_and_map(dn, 0);
>> - if (prv->irq == NO_IRQ) {
>> + if (!prv->irq) {
>> dev_err(dev, "Error mapping IRQ!\n");
>> return -EINVAL;
>> }
>
>
> Thanks,
> Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
@ 2022-10-06 8:18 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-10-06 8:18 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Vignesh Raghavendra, linux-kernel, linux-mtd
Hi Miquel
Le 06/10/2022 à 09:47, Miquel Raynal a écrit :
> Hi Christophe,
>
> christophe.leroy@csgroup.eu wrote on Thu, 6 Oct 2022 07:29:12 +0200:
>
>> NO_IRQ is used to check the return of irq_of_parse_and_map().
>>
>> On some architecture NO_IRQ is 0, on other architectures it is -1.
>>
>> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>>
>> So use 0 instead of using NO_IRQ.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>
> Deserves Fixes and Cc:stable tags, isn't it?
I don't think so, because the only user today is powerpc which defines
NO_IRQ as 0.
In the stable-kernel-rules.rst it is said:
- It must fix a real bug that bothers people (not a, "This could be a
problem..." type thing).
>
>> ---
>> drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
>> index 800d774aed8e..f68349cb7824 100644
>> --- a/drivers/mtd/nand/raw/mpc5121_nfc.c
>> +++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
>> @@ -663,7 +663,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
>> }
>>
>> prv->irq = irq_of_parse_and_map(dn, 0);
>> - if (prv->irq == NO_IRQ) {
>> + if (!prv->irq) {
>> dev_err(dev, "Error mapping IRQ!\n");
>> return -EINVAL;
>> }
>
>
> Thanks,
> Miquèl
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
2022-10-06 5:29 ` Christophe Leroy
@ 2022-10-18 9:04 ` Miquel Raynal
-1 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2022-10-18 9:04 UTC (permalink / raw)
To: Christophe Leroy, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
Cc: linux-kernel, linux-mtd
On Thu, 2022-10-06 at 05:29:12 UTC, Christophe Leroy wrote:
> NO_IRQ is used to check the return of irq_of_parse_and_map().
>
> On some architecture NO_IRQ is 0, on other architectures it is -1.
>
> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>
> So use 0 instead of using NO_IRQ.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
@ 2022-10-18 9:04 ` Miquel Raynal
0 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2022-10-18 9:04 UTC (permalink / raw)
To: Christophe Leroy, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
Cc: linux-kernel, linux-mtd
On Thu, 2022-10-06 at 05:29:12 UTC, Christophe Leroy wrote:
> NO_IRQ is used to check the return of irq_of_parse_and_map().
>
> On some architecture NO_IRQ is 0, on other architectures it is -1.
>
> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>
> So use 0 instead of using NO_IRQ.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-10-18 9:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 5:29 [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0 Christophe Leroy
2022-10-06 5:29 ` Christophe Leroy
2022-10-06 7:47 ` Miquel Raynal
2022-10-06 7:47 ` Miquel Raynal
2022-10-06 8:18 ` Christophe Leroy
2022-10-06 8:18 ` Christophe Leroy
2022-10-18 9:04 ` Miquel Raynal
2022-10-18 9:04 ` Miquel Raynal
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.