2022-11-01 02:21:31

by Yang Li

[permalink] [raw]
Subject: [PATCH -next] crypto: Remove surplus dev_err() when using platform_get_irq()

There is no need to call the dev_err() function directly to print a
custom message when handling an error from either the platform_get_irq()
or platform_get_irq_byname() functions as both are going to display an
appropriate error message in case of a failure.

./drivers/crypto/rockchip/rk3288_crypto.c:351:2-9: line 351 is
redundant because platform_get_irq() already prints an error

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2677
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Yang Li <[email protected]>
---
drivers/crypto/rockchip/rk3288_crypto.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c
index 6217e73ba4c4..9f6ba770a90a 100644
--- a/drivers/crypto/rockchip/rk3288_crypto.c
+++ b/drivers/crypto/rockchip/rk3288_crypto.c
@@ -348,7 +348,6 @@ static int rk_crypto_probe(struct platform_device *pdev)

crypto_info->irq = platform_get_irq(pdev, 0);
if (crypto_info->irq < 0) {
- dev_err(&pdev->dev, "control Interrupt is not available.\n");
err = crypto_info->irq;
goto err_crypto;
}
--
2.20.1.7.g153144c



2022-11-04 07:44:02

by Corentin LABBE

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: Remove surplus dev_err() when using platform_get_irq()

Le Tue, Nov 01, 2022 at 10:17:51AM +0800, Yang Li a ?crit :
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from either the platform_get_irq()
> or platform_get_irq_byname() functions as both are going to display an
> appropriate error message in case of a failure.
>
> ./drivers/crypto/rockchip/rk3288_crypto.c:351:2-9: line 351 is
> redundant because platform_get_irq() already prints an error
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2677
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Yang Li <[email protected]>
> ---

Hello

The subject should start by "crypto: rockchip:"

Otherwise it is:
Acked-by: Corentin Labbe <[email protected]>

Thanks