Skip to contentSkip to conversation

net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()

PATCH Applied Jisheng Zhang 3 participants 3 messages Jan 26, 2022 – Jan 27, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()

When readl_poll_timeout() timeout, we'd better directly use its return value.

Before this patch:

[    2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14

After this patch:

[    2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -1
index 617d0e4c6495..09644ab0d87a 100644
@@ -756,7 +756,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv)
 
 	if (err) {
 		dev_err(priv->device, "EMAC reset timeout\n");
-		return -EFAULT;
+		return err;
 	}
 	return 0;
 }
Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi!

Dne sreda, 26. januar 2022 ob 17:52:15 CET je Jisheng Zhang napisal(a):

Quoted 10 lines

When readl_poll_timeout() timeout, we'd better directly use its return value.

Before this patch:

[    2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14

After this patch:

[    2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110

Best regards,
Jernej

drivers/net/

Quoted 5 lines
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ renamed from drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +0 -0

ethernet/stmicro/stmmac/dwmac-sun8i.c

Quoted 16 lines

index 617d0e4c6495..09644ab0d87a 100644

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -1
@@ -756,7 +756,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv)
 
 	if (err) {
 		dev_err(priv->device, "EMAC reset timeout\n");
-		return -EFAULT;
+		return err;
 	}
 	return 0;
 }
Signature · 1 line
2.34.1
#2 lore raw
In reply to Jisheng Zhang
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

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

Quoted 10 lines · On Thu, 27 Jan 2022 00:52:15 +0800 you wrote:

When readl_poll_timeout() timeout, we'd better directly use its return value.

Before this patch:

[    2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14

After this patch:

[    2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110

[...]

Here is the summary with links:
- net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()

    https://git.kernel.org/netdev/net/c/9e0db41e7a0b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html