[2/2] drivers: net: phy: aquantia: make it less verbose
diff mbox series

Message ID 20191204133216.12716-2-alexandru.marginean@nxp.com
State New
Delegated to: Joe Hershberger
Headers show
Series
  • [1/2] drivers: net: phy: aquantia: drop XGMII as a valid system interface proto
Related show

Commit Message

Alexandru Marginean Dec. 4, 2019, 1:32 p.m. UTC
The driver now unconditionally prints some information that's not
universally useful.  Replace printf with debug.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
---
 drivers/net/phy/aquantia.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

Priyanka Jain Dec. 5, 2019, 4:47 a.m. UTC | #1
>-----Original Message-----
>From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Alex Marginean
>Sent: Wednesday, December 4, 2019 7:02 PM
>To: u-boot@lists.denx.de
>Cc: Joe Hershberger <joe.hershberger@ni.com>
>Subject: [PATCH 2/2] drivers: net: phy: aquantia: make it less verbose
>
>The driver now unconditionally prints some information that's not universally
>useful.  Replace printf with debug.
>
>Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
>---
> drivers/net/phy/aquantia.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
>diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index
>2af09907a1..aa0deb1f78 100644
>--- a/drivers/net/phy/aquantia.c
>+++ b/drivers/net/phy/aquantia.c
>@@ -409,9 +409,9 @@ int aquantia_config(struct phy_device *phydev)
> 	fault = phy_read(phydev, MDIO_MMD_VEND1, GLOBAL_FAULT);
>
> 	if (id != 0)
>-		printf("%s running firmware version %X.%X.%X\n",
>-		       phydev->dev->name, (id >> 8), id & 0xff,
>-		       (rstatus >> 4) & 0xf);
>+		debug("%s running firmware version %X.%X.%X\n",
>+		      phydev->dev->name, (id >> 8), id & 0xff,
>+		      (rstatus >> 4) & 0xf);
>
> 	if (fault != 0)
> 		printf("%s fault 0x%04x detected\n", phydev->dev->name,
>fault); @@ -492,12 +492,12 @@ int aquantia_config(struct phy_device
>*phydev)
>
> 		if (usx_an) {
> 			reg_val1 |=
>AQUANTIA_USX_AUTONEG_CONTROL_ENA;
>-			printf("%s: system interface USXGMII\n",
>-			       phydev->dev->name);
>+			debug("%s: system interface USXGMII\n",
>+			      phydev->dev->name);
> 		} else {
> 			reg_val1 &=
>~AQUANTIA_USX_AUTONEG_CONTROL_ENA;
>-			printf("%s: system interface XFI\n",
>-			       phydev->dev->name);
>+			debug("%s: system interface XFI\n",
>+			      phydev->dev->name);
> 		}
>
> 		phy_write(phydev, MDIO_MMD_PHYXS,
>@@ -524,11 +524,11 @@ int aquantia_config(struct phy_device *phydev)
> 	val = phy_read(phydev, MDIO_MMD_VEND1,
>AQUANTIA_RESERVED_STATUS);
> 	reg_val1 = phy_read(phydev, MDIO_MMD_VEND1,
>AQUANTIA_FIRMWARE_ID);
>
>-	printf("%s: %s Firmware Version %x.%x.%x\n", phydev->dev->name,
>-	       phydev->drv->name,
>-	       (reg_val1 & AQUANTIA_FIRMWARE_MAJOR_MASK) >> 8,
>-	       reg_val1 & AQUANTIA_FIRMWARE_MINOR_MASK,
>-	       (val & AQUANTIA_FIRMWARE_BUILD_MASK) >> 4);
>+	debug("%s: %s Firmware Version %x.%x.%x\n", phydev->dev->name,
>+	      phydev->drv->name,
>+	      (reg_val1 & AQUANTIA_FIRMWARE_MAJOR_MASK) >> 8,
>+	      reg_val1 & AQUANTIA_FIRMWARE_MINOR_MASK,
>+	      (val & AQUANTIA_FIRMWARE_BUILD_MASK) >> 4);
>
> 	return 0;
> }
>--
>2.17.1
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

Patch
diff mbox series

diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 2af09907a1..aa0deb1f78 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -409,9 +409,9 @@  int aquantia_config(struct phy_device *phydev)
 	fault = phy_read(phydev, MDIO_MMD_VEND1, GLOBAL_FAULT);
 
 	if (id != 0)
-		printf("%s running firmware version %X.%X.%X\n",
-		       phydev->dev->name, (id >> 8), id & 0xff,
-		       (rstatus >> 4) & 0xf);
+		debug("%s running firmware version %X.%X.%X\n",
+		      phydev->dev->name, (id >> 8), id & 0xff,
+		      (rstatus >> 4) & 0xf);
 
 	if (fault != 0)
 		printf("%s fault 0x%04x detected\n", phydev->dev->name, fault);
@@ -492,12 +492,12 @@  int aquantia_config(struct phy_device *phydev)
 
 		if (usx_an) {
 			reg_val1 |= AQUANTIA_USX_AUTONEG_CONTROL_ENA;
-			printf("%s: system interface USXGMII\n",
-			       phydev->dev->name);
+			debug("%s: system interface USXGMII\n",
+			      phydev->dev->name);
 		} else {
 			reg_val1 &= ~AQUANTIA_USX_AUTONEG_CONTROL_ENA;
-			printf("%s: system interface XFI\n",
-			       phydev->dev->name);
+			debug("%s: system interface XFI\n",
+			      phydev->dev->name);
 		}
 
 		phy_write(phydev, MDIO_MMD_PHYXS,
@@ -524,11 +524,11 @@  int aquantia_config(struct phy_device *phydev)
 	val = phy_read(phydev, MDIO_MMD_VEND1, AQUANTIA_RESERVED_STATUS);
 	reg_val1 = phy_read(phydev, MDIO_MMD_VEND1, AQUANTIA_FIRMWARE_ID);
 
-	printf("%s: %s Firmware Version %x.%x.%x\n", phydev->dev->name,
-	       phydev->drv->name,
-	       (reg_val1 & AQUANTIA_FIRMWARE_MAJOR_MASK) >> 8,
-	       reg_val1 & AQUANTIA_FIRMWARE_MINOR_MASK,
-	       (val & AQUANTIA_FIRMWARE_BUILD_MASK) >> 4);
+	debug("%s: %s Firmware Version %x.%x.%x\n", phydev->dev->name,
+	      phydev->drv->name,
+	      (reg_val1 & AQUANTIA_FIRMWARE_MAJOR_MASK) >> 8,
+	      reg_val1 & AQUANTIA_FIRMWARE_MINOR_MASK,
+	      (val & AQUANTIA_FIRMWARE_BUILD_MASK) >> 4);
 
 	return 0;
 }