2022-04-22 13:27:23

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] can: ctucanfd: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Eliminate the follow coccicheck warnings:

./drivers/net/can/ctucanfd/ctucanfd_platform.c:67:2-9: line 67 is
redundant because platform_get_irq() already prints an error.

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/net/can/ctucanfd/ctucanfd_platform.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c
index 5e4806068662..89d54c2151e1 100644
--- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
+++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
@@ -64,7 +64,6 @@ static int ctucan_platform_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- dev_err(dev, "Cannot find interrupt.\n");
ret = irq;
goto err;
}
--
2.20.1.7.g153144c


2022-04-22 17:24:41

by Pavel Pisa

[permalink] [raw]
Subject: Re: [PATCH] can: ctucanfd: Remove unnecessary print function dev_err()

Thanks for checking

On Thursday 21 of April 2022 22:32:42 Jiapeng Chong wrote:
> The print function dev_err() is redundant because platform_get_irq()
> already prints an error.
>
> Eliminate the follow coccicheck warnings:
>
> ./drivers/net/can/ctucanfd/ctucanfd_platform.c:67:2-9: line 67 is
> redundant because platform_get_irq() already prints an error.
>
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>

Acked-by: Pave Pisa <[email protected]>

> drivers/net/can/ctucanfd/ctucanfd_platform.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c
> b/drivers/net/can/ctucanfd/ctucanfd_platform.c index
> 5e4806068662..89d54c2151e1 100644
> --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
> +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
> @@ -64,7 +64,6 @@ static int ctucan_platform_probe(struct platform_device
> *pdev) }
> irq = platform_get_irq(pdev, 0);
> if (irq < 0) {
> - dev_err(dev, "Cannot find interrupt.\n");
> ret = irq;
> goto err;
> }