[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c43b85f8-2bc9-7b19-6b86-953246c88d2c@baylibre.com>
Date: Thu, 2 Apr 2020 15:26:18 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: Tang Bin <tangbin@...s.chinamobile.com>, clabbe@...libre.com,
herbert@...dor.apana.org.au, davem@...emloft.net
Cc: linux-amlogic@...ts.infradead.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto:amlogic - use platform_get_irq_optional()
Hi,
On 02/04/2020 13:33, Tang Bin wrote:
> In order to simply code,because platform_get_irq() already has
> dev_err() message.
>
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> ---
> drivers/crypto/amlogic/amlogic-gxl-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
> index 9d4ead2f7..37901bd81 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
> @@ -252,7 +252,7 @@ static int meson_crypto_probe(struct platform_device *pdev)
>
> mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
> for (i = 0; i < MAXFLOW; i++) {
> - mc->irqs[i] = platform_get_irq(pdev, i);
> + mc->irqs[i] = platform_get_irq_optional(pdev, i);
> if (mc->irqs[i] < 0) {
> dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
> return mc->irqs[i];
>
NACK, the irq is not optional, I don't see why platform_get_irq_optional() should be used here
and how it could "simply code".
Neil
Powered by blists - more mailing lists