Skip to contentSkip to conversation

net: stmmac: use dev_info() before netdev is registered

PATCH Applied Jisheng Zhang 2 participants 2 messages May 28, 2019 – May 29, 2019

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

PATCH 1/1 net: stmmac: use dev_info() before netdev is registered

Before the netdev is registered, calling netdev_info() will emit something as "(unnamed net device) (uninitialized)", looks confusing.

Before this patch:

[    3.155028] stmmaceth f7b60000.ethernet (unnamed net_device) (uninitialized): device MAC address 52:1a:55:18:9e:9d

After this patch:

[    3.155028] stmmaceth f7b60000.ethernet: device MAC address 52:1a:55:18:9e:9d
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -2
index 08022fbcb67a..7af083c29b36 100644
@@ -2167,8 +2167,8 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv)
 		stmmac_get_umac_addr(priv, priv->hw, priv->dev->dev_addr, 0);
 		if (!is_valid_ether_addr(priv->dev->dev_addr))
 			eth_hw_addr_random(priv->dev);
-		netdev_info(priv->dev, "device MAC address %pM\n",
-			    priv->dev->dev_addr);
+		dev_info(priv->device, "device MAC address %pM\n",
+			 priv->dev->dev_addr);
 	}
 }
 
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw

From: Jisheng Zhang <[email protected]>
Date: Tue, 28 May 2019 07:02:07 +0000

Quoted 10 lines

Before the netdev is registered, calling netdev_info() will emit something as "(unnamed net device) (uninitialized)", looks confusing.

Before this patch:

[    3.155028] stmmaceth f7b60000.ethernet (unnamed net_device) (uninitialized): device MAC address 52:1a:55:18:9e:9d

After this patch:

[    3.155028] stmmaceth f7b60000.ethernet: device MAC address 52:1a:55:18:9e:9d

Applied.