2021-11-05 03:20:15

by Xu Wang

[permalink] [raw]
Subject: [PATCH] net: ethernet: litex: Remove unnecessary print function dev_err()

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

Signed-off-by: Xu Wang <[email protected]>
---
drivers/net/ethernet/litex/litex_liteeth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c
index 3d9385a4989b..ab9fa1525053 100644
--- a/drivers/net/ethernet/litex/litex_liteeth.c
+++ b/drivers/net/ethernet/litex/litex_liteeth.c
@@ -242,10 +242,8 @@ static int liteeth_probe(struct platform_device *pdev)
priv->dev = &pdev->dev;

irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "Failed to get IRQ %d\n", irq);
+ if (irq < 0)
return irq;
- }
netdev->irq = irq;

priv->base = devm_platform_ioremap_resource_byname(pdev, "mac");
--
2.25.1


2021-11-05 04:09:13

by Cai,Huoqing

[permalink] [raw]
Subject: Re: [PATCH] net: ethernet: litex: Remove unnecessary print function dev_err()

On 05 11月 21 01:42:17, Xu Wang wrote:
> The print function dev_err() is redundant because
> platform_get_irq() already prints an error.
>
Reviewed-by: Cai Huoqing <[email protected]>
> Signed-off-by: Xu Wang <[email protected]>
> ---
> drivers/net/ethernet/litex/litex_liteeth.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c
> index 3d9385a4989b..ab9fa1525053 100644
> --- a/drivers/net/ethernet/litex/litex_liteeth.c
> +++ b/drivers/net/ethernet/litex/litex_liteeth.c
> @@ -242,10 +242,8 @@ static int liteeth_probe(struct platform_device *pdev)
> priv->dev = &pdev->dev;
>
> irq = platform_get_irq(pdev, 0);
> - if (irq < 0) {
> - dev_err(&pdev->dev, "Failed to get IRQ %d\n", irq);
> + if (irq < 0)
> return irq;
> - }
> netdev->irq = irq;
>
> priv->base = devm_platform_ioremap_resource_byname(pdev, "mac");
> --
> 2.25.1
>

2021-11-05 15:39:42

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] net: ethernet: litex: Remove unnecessary print function dev_err()

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

On Fri, 5 Nov 2021 01:42:17 +0000 you wrote:
> The print function dev_err() is redundant because
> platform_get_irq() already prints an error.
>
> Signed-off-by: Xu Wang <[email protected]>
> ---
> drivers/net/ethernet/litex/litex_liteeth.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
- net: ethernet: litex: Remove unnecessary print function dev_err()
https://git.kernel.org/netdev/net/c/827beb7781d3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html