From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
Date: Thu, 6 Oct 2022 09:47:29 +0200 [thread overview]
Message-ID: <20221006094729.61ff9b24@xps-13> (raw)
In-Reply-To: <4e3ca3e0077ea124ea210c312e6e620f0f9e8bca.1665034065.git.christophe.leroy@csgroup.eu>
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/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mpc5121: Replace NO_IRQ by 0
Date: Thu, 6 Oct 2022 09:47:29 +0200 [thread overview]
Message-ID: <20221006094729.61ff9b24@xps-13> (raw)
In-Reply-To: <4e3ca3e0077ea124ea210c312e6e620f0f9e8bca.1665034065.git.christophe.leroy@csgroup.eu>
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
next prev parent reply other threads:[~2022-10-06 7:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221006094729.61ff9b24@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.