* [PATCH] crypto: mv_cesa: remove NO_IRQ reference
@ 2016-09-02 23:26 Arnd Bergmann
2016-09-03 6:54 ` Boris Brezillon
2016-09-07 13:21 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-09-02 23:26 UTC (permalink / raw)
To: Herbert Xu
Cc: Romain Perier, Boris Brezillon, Arnaud Ebalard, Thomas Petazzoni,
Arnd Bergmann, David S. Miller, linux-crypto, linux-kernel
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>
---
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;
}
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: mv_cesa: remove NO_IRQ reference
2016-09-02 23:26 [PATCH] crypto: mv_cesa: remove NO_IRQ reference Arnd Bergmann
@ 2016-09-03 6:54 ` Boris Brezillon
2016-09-07 13:21 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2016-09-03 6:54 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Herbert Xu, Romain Perier, Arnaud Ebalard, Thomas Petazzoni,
David S. Miller, linux-crypto, linux-kernel
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;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: mv_cesa: remove NO_IRQ reference
2016-09-02 23:26 [PATCH] crypto: mv_cesa: remove NO_IRQ reference Arnd Bergmann
2016-09-03 6:54 ` Boris Brezillon
@ 2016-09-07 13:21 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2016-09-07 13:21 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Romain Perier, Boris Brezillon, Arnaud Ebalard, Thomas Petazzoni,
David S. Miller, linux-crypto, linux-kernel
On Sat, Sep 03, 2016 at 01:26:40AM +0200, Arnd Bergmann 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>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-07 13:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 23:26 [PATCH] crypto: mv_cesa: remove NO_IRQ reference Arnd Bergmann
2016-09-03 6:54 ` Boris Brezillon
2016-09-07 13:21 ` Herbert Xu
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).