* [PATCH] can: bxcan: Remove unnecessary print function dev_err()
@ 2023-05-06 8:07 Jiapeng Chong
2023-05-06 10:41 ` Simon Horman
2023-05-09 12:22 ` Marc Kleine-Budde
0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2023-05-06 8:07 UTC (permalink / raw)
To: dario.binacchi
Cc: wg, mkl, davem, edumazet, kuba, pabeni, linux-can, netdev,
linux-kernel, Jiapeng Chong, Abaci Robot
The print function dev_err() is redundant because
platform_get_irq_byname() already prints an error.
./drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because platform_get_irq() already prints an error.
./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant because platform_get_irq() already prints an error.
./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant because platform_get_irq() already prints an error.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4878
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/net/can/bxcan.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/can/bxcan.c b/drivers/net/can/bxcan.c
index e26ccd41e3cb..7b285eeb08a1 100644
--- a/drivers/net/can/bxcan.c
+++ b/drivers/net/can/bxcan.c
@@ -954,22 +954,16 @@ static int bxcan_probe(struct platform_device *pdev)
}
rx_irq = platform_get_irq_byname(pdev, "rx0");
- if (rx_irq < 0) {
- dev_err(dev, "failed to get rx0 irq\n");
+ if (rx_irq < 0)
return rx_irq;
- }
tx_irq = platform_get_irq_byname(pdev, "tx");
- if (tx_irq < 0) {
- dev_err(dev, "failed to get tx irq\n");
+ if (tx_irq < 0)
return tx_irq;
- }
sce_irq = platform_get_irq_byname(pdev, "sce");
- if (sce_irq < 0) {
- dev_err(dev, "failed to get sce irq\n");
+ if (sce_irq < 0)
return sce_irq;
- }
ndev = alloc_candev(sizeof(struct bxcan_priv), BXCAN_TX_MB_NUM);
if (!ndev) {
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] can: bxcan: Remove unnecessary print function dev_err()
2023-05-06 8:07 [PATCH] can: bxcan: Remove unnecessary print function dev_err() Jiapeng Chong
@ 2023-05-06 10:41 ` Simon Horman
2023-05-09 12:22 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-05-06 10:41 UTC (permalink / raw)
To: Jiapeng Chong
Cc: dario.binacchi, wg, mkl, davem, edumazet, kuba, pabeni, linux-can,
netdev, linux-kernel, Abaci Robot
On Sat, May 06, 2023 at 04:07:25PM +0800, Jiapeng Chong wrote:
> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
>
> ./drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because platform_get_irq() already prints an error.
> ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant because platform_get_irq() already prints an error.
> ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant because platform_get_irq() already prints an error.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4878
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] can: bxcan: Remove unnecessary print function dev_err()
2023-05-06 8:07 [PATCH] can: bxcan: Remove unnecessary print function dev_err() Jiapeng Chong
2023-05-06 10:41 ` Simon Horman
@ 2023-05-09 12:22 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2023-05-09 12:22 UTC (permalink / raw)
To: Jiapeng Chong
Cc: dario.binacchi, wg, davem, edumazet, kuba, pabeni, linux-can,
netdev, linux-kernel, Abaci Robot
[-- Attachment #1: Type: text/plain, Size: 992 bytes --]
On 06.05.2023 16:07:25, Jiapeng Chong wrote:
> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
>
> ./drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because platform_get_irq() already prints an error.
> ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant because platform_get_irq() already prints an error.
> ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant because platform_get_irq() already prints an error.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4878
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied to linux-can-next
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-09 12:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-06 8:07 [PATCH] can: bxcan: Remove unnecessary print function dev_err() Jiapeng Chong
2023-05-06 10:41 ` Simon Horman
2023-05-09 12:22 ` Marc Kleine-Budde
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).