From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Romain Perier <romain.perier@free-electrons.com>,
Arnaud Ebalard <arno@natisbad.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: mv_cesa: remove NO_IRQ reference
Date: Sat, 3 Sep 2016 08:54:27 +0200 [thread overview]
Message-ID: <20160903085427.1e0285de@bbrezillon> (raw)
In-Reply-To: <20160902232648.2119621-1-arnd@arndb.de>
On Sat, 3 Sep 2016 01:26:40 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> Drivers should not use NO_IRQ, as we are trying to get rid of that.
> In this case, the call to irq_of_parse_and_map() is both wrong
> (as it returns '0' on failure, not NO_IRQ) and unnecessary
> (as platform_get_irq() does the same thing)
>
> This removes the call to irq_of_parse_and_map() and checks for
> the error code correctly.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> drivers/crypto/mv_cesa.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> It would be good if someone could test this on a machine that boots
> from DT to ensure the conversion was correct.
>
> diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
> index e6b658faef63..104e9ce9400a 100644
> --- a/drivers/crypto/mv_cesa.c
> +++ b/drivers/crypto/mv_cesa.c
> @@ -1091,11 +1091,8 @@ static int mv_probe(struct platform_device *pdev)
>
> cp->max_req_size = cp->sram_size - SRAM_CFG_SPACE;
>
> - if (pdev->dev.of_node)
> - irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> - else
> - irq = platform_get_irq(pdev, 0);
> - if (irq < 0 || irq == NO_IRQ) {
> + irq = platform_get_irq(pdev, 0);
> + if (irq < 0) {
> ret = irq;
> goto err;
> }
next prev parent reply other threads:[~2016-09-03 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 23:26 [PATCH] crypto: mv_cesa: remove NO_IRQ reference Arnd Bergmann
2016-09-03 6:54 ` Boris Brezillon [this message]
2016-09-07 13:21 ` Herbert Xu
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=20160903085427.1e0285de@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=arnd@arndb.de \
--cc=arno@natisbad.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=romain.perier@free-electrons.com \
--cc=thomas.petazzoni@free-electrons.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 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).