Skip to contentSkip to conversation

staging: r8188eu: do not spam the kernel log

PATCH In review Michael Straube 2 participants 2 messages Aug 8, 2022 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: r8188eu: do not spam the kernel log

Drivers should not spam the kernel log if they work properly. Convert the functions Hal_EfuseParseIDCode88E() and _netdev_open() to use netdev_dbg() instead of pr_info() so that developers can still enable it if they want to see this information.

---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 ++-
 drivers/staging/r8188eu/os_dep/os_intfs.c       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +2 -1
index 5b8f1a912bbb..58a193334b91 100644
@@ -688,6 +688,7 @@ Hal_EfuseParseIDCode88E(
 	)
 {
 	struct eeprom_priv *pEEPROM = &padapter->eeprompriv;
+	struct net_device *netdev = padapter->pnetdev;
 	u16			EEPROMId;
 
 	/*  Check 0x8129 again for making sure autoload status!! */
@@ -699,7 +700,7 @@ Hal_EfuseParseIDCode88E(
 		pEEPROM->bautoload_fail_flag = false;
 	}
 
-	pr_info("EEPROM ID = 0x%04x\n", EEPROMId);
+	netdev_dbg(netdev, "EEPROM ID = 0x%04x\n", EEPROMId);
 }
 
 static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G, u8 *PROMContent, bool AutoLoadFail)
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
index cac9553666e6..22e91657f3fb 100644
@@ -635,7 +635,7 @@ int _netdev_open(struct net_device *pnetdev)
 		if (status == _FAIL)
 			goto netdev_open_error;
 
-		pr_info("MAC Address = %pM\n", pnetdev->dev_addr);
+		netdev_dbg(pnetdev, "MAC Address = %pM\n", pnetdev->dev_addr);
 
 		status = rtw_start_drv_threads(padapter);
 		if (status == _FAIL) {
Signature · 1 line
2.37.1
Tested-by on v1 1/1
#1 lore raw
Quoted 37 lines · Michael Straube

Drivers should not spam the kernel log if they work properly. Convert the functions Hal_EfuseParseIDCode88E() and _netdev_open() to use netdev_dbg() instead of pr_info() so that developers can still enable it if they want to see this information.

---
  drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 ++-
  drivers/staging/r8188eu/os_dep/os_intfs.c       | 2 +-
  2 files changed, 3 insertions(+), 2 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +2 -1
index 5b8f1a912bbb..58a193334b91 100644
@@ -688,6 +688,7 @@ Hal_EfuseParseIDCode88E(
  	)
  {
  	struct eeprom_priv *pEEPROM = &padapter->eeprompriv;
+	struct net_device *netdev = padapter->pnetdev;
  	u16			EEPROMId;
 
  	/*  Check 0x8129 again for making sure autoload status!! */
@@ -699,7 +700,7 @@ Hal_EfuseParseIDCode88E(
  		pEEPROM->bautoload_fail_flag = false;
  	}
 
-	pr_info("EEPROM ID = 0x%04x\n", EEPROMId);
+	netdev_dbg(netdev, "EEPROM ID = 0x%04x\n", EEPROMId);
  }
 
  static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G, u8 *PROMContent, bool AutoLoadFail)
drivers/staging/r8188eu/os_dep/os_intfs.c +0 -0
index cac9553666e6..22e91657f3fb 100644

drivers/staging/r8188eu/os_dep/os_intfs.c int _netdev_open(struct net_device *pnetdev) · line 641

Quoted 8 lines
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
@@ -635,7 +635,7 @@ int _netdev_open(struct net_device *pnetdev)
  		if (status == _FAIL)
  			goto netdev_open_error;
 
-		pr_info("MAC Address = %pM\n", pnetdev->dev_addr);
+		netdev_dbg(pnetdev, "MAC Address = %pM\n", pnetdev->dev_addr);
 
  		status = rtw_start_drv_threads(padapter);
  		if (status == _FAIL) {