2020-12-14 14:40:49

by Tian Tao

[permalink] [raw]
Subject: [PATCH] crypto: inside-secure - fix platform_get_irq.cocci warnings

Remove dev_err() messages after platform_get_irq*() failures.
drivers/crypto/inside-secure/safexcel.c: line 1161 is redundant
because platform_get_irq() already prints an error

Generated by: scripts/coccinelle/api/platform_get_irq.cocci

Signed-off-by: Tian Tao <[email protected]>
---
drivers/crypto/inside-secure/safexcel.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 2e15621..efabc44bf 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1166,11 +1166,8 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
dev = &plf_pdev->dev;
irq = platform_get_irq_byname(plf_pdev, irq_name);

- if (irq < 0) {
- dev_err(dev, "unable to get IRQ '%s' (err %d)\n",
- irq_name, irq);
+ if (irq < 0)
return irq;
- }
} else {
return -ENXIO;
}
--
2.7.4


2020-12-22 13:59:36

by Antoine Tenart

[permalink] [raw]
Subject: Re: [PATCH] crypto: inside-secure - fix platform_get_irq.cocci warnings

Hello,

Quoting Tian Tao (2020-12-14 12:44:40)
> Remove dev_err() messages after platform_get_irq*() failures.
> drivers/crypto/inside-secure/safexcel.c: line 1161 is redundant
> because platform_get_irq() already prints an error
>
> Generated by: scripts/coccinelle/api/platform_get_irq.cocci
>
> Signed-off-by: Tian Tao <[email protected]>

Acked-by: Antoine Tenart <[email protected]>

Thanks!
Antoine

> ---
> drivers/crypto/inside-secure/safexcel.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
> index 2e15621..efabc44bf 100644
> --- a/drivers/crypto/inside-secure/safexcel.c
> +++ b/drivers/crypto/inside-secure/safexcel.c
> @@ -1166,11 +1166,8 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
> dev = &plf_pdev->dev;
> irq = platform_get_irq_byname(plf_pdev, irq_name);
>
> - if (irq < 0) {
> - dev_err(dev, "unable to get IRQ '%s' (err %d)\n",
> - irq_name, irq);
> + if (irq < 0)
> return irq;
> - }
> } else {
> return -ENXIO;
> }
> --
> 2.7.4
>

2021-01-02 22:11:30

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: inside-secure - fix platform_get_irq.cocci warnings

On Mon, Dec 14, 2020 at 07:44:40PM +0800, Tian Tao wrote:
> Remove dev_err() messages after platform_get_irq*() failures.
> drivers/crypto/inside-secure/safexcel.c: line 1161 is redundant
> because platform_get_irq() already prints an error
>
> Generated by: scripts/coccinelle/api/platform_get_irq.cocci
>
> Signed-off-by: Tian Tao <[email protected]>
> ---
> drivers/crypto/inside-secure/safexcel.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt