Skip to contentSkip to conversation

net: broadcom: Remove print of base address

PATCH In review Florian Fainelli 2 participants 5 messages Mar 20, 2019 – Mar 21, 2019

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

cover net: broadcom: Remove print of base address

Hi,

Some broadcom MDIO/switch/Ethernet MAC drivers insist on printing the base register virtual address which has little value.

Florian Fainelli (3):
net: phy: mdio-bcm-unimac: Remove print of base address
net: dsa: bcm_sf2: Remove print of base address
net: systemport: Remove print of base address

 drivers/net/dsa/bcm_sf2.c                  | 9 +++++----
 drivers/net/ethernet/broadcom/bcmsysport.c | 6 +++---
 drivers/net/phy/mdio-bcm-unimac.c          | 2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 net: phy: mdio-bcm-unimac: Remove print of base address

Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. Displaying the virtual memory at bootup time is not helpful, especially given we use a dev_info() which already displays the platform device's address.

---
 drivers/net/phy/mdio-bcm-unimac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mdio-bcm-unimac.c +1 -1
index 8295bc7c8c20..3a592629dc7e 100644
@@ -292,7 +292,7 @@ static int unimac_mdio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 
-	dev_info(&pdev->dev, "Broadcom UniMAC MDIO bus at 0x%p\n", priv->base);
+	dev_info(&pdev->dev, "Broadcom UniMAC MDIO bus\n");
 
 	return 0;
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/3 net: dsa: bcm_sf2: Remove print of base address

In reply to Florian Fainelli

Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. Displaying the virtual memory at bootup time is not helpful, we use a dev_info() print which already displays the platform device's address.

---
 drivers/net/dsa/bcm_sf2.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/dsa/bcm_sf2.c +5 -4
index c8e3f05e1d72..4ccb3239f5f7 100644
@@ -1188,10 +1188,11 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
 	if (ret)
 		goto out_mdio;
 
-	pr_info("Starfighter 2 top: %x.%02x, core: %x.%02x base: 0x%p, IRQs: %d, %d\n",
-		priv->hw_params.top_rev >> 8, priv->hw_params.top_rev & 0xff,
-		priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
-		priv->core, priv->irq0, priv->irq1);
+	dev_info(&pdev->dev,
+		 "Starfighter 2 top: %x.%02x, core: %x.%02x, IRQs: %d, %d\n",
+		 priv->hw_params.top_rev >> 8, priv->hw_params.top_rev & 0xff,
+		 priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
+		 priv->irq0, priv->irq1);
 
 	return 0;
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/3 net: systemport: Remove print of base address

In reply to Florian Fainelli

Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. Displaying the virtual memory at bootup time is not helpful, especially given we use a dev_info() which already displays the platform device's address.

---
 drivers/net/ethernet/broadcom/bcmsysport.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bcmsysport.c +3 -3
index bc3ac369cbe3..c86515f7fd2f 100644
@@ -2599,11 +2599,11 @@ static int bcm_sysport_probe(struct platform_device *pdev)
 
 	priv->rev = topctrl_readl(priv, REV_CNTL) & REV_MASK;
 	dev_info(&pdev->dev,
-		 "Broadcom SYSTEMPORT%s" REV_FMT
-		 " at 0x%p (irqs: %d, %d, TXQs: %d, RXQs: %d)\n",
+		 "Broadcom SYSTEMPORT%s " REV_FMT
+		 " (irqs: %d, %d, TXQs: %d, RXQs: %d)\n",
 		 priv->is_lite ? " Lite" : "",
 		 (priv->rev >> 8) & 0xff, priv->rev & 0xff,
-		 priv->base, priv->irq0, priv->irq1, txq, rxq);
+		 priv->irq0, priv->irq1, txq, rxq);
 
 	return 0;
 
Signature · 1 line
2.17.1
maintainer
#4 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Wed, 20 Mar 2019 09:45:14 -0700

Quoted 2 lines

Some broadcom MDIO/switch/Ethernet MAC drivers insist on printing the base register virtual address which has little value.

Makes sense, series applied, thanks.