* [PATCH] staging: r8188eu: do not spam the kernel log
@ 2022-08-08 6:50 Michael Straube
2022-08-08 21:40 ` Philipp Hortmann
0 siblings, 1 reply; 2+ messages in thread
From: Michael Straube @ 2022-08-08 6:50 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, 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.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
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(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 5b8f1a912bbb..58a193334b91 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -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)
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index cac9553666e6..22e91657f3fb 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -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) {
--
2.37.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: r8188eu: do not spam the kernel log
2022-08-08 6:50 [PATCH] staging: r8188eu: do not spam the kernel log Michael Straube
@ 2022-08-08 21:40 ` Philipp Hortmann
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hortmann @ 2022-08-08 21:40 UTC (permalink / raw)
To: Michael Straube, gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel
On 8/8/22 08:50, Michael Straube wrote:
> 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.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> 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(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> index 5b8f1a912bbb..58a193334b91 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> @@ -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)
> diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
> index cac9553666e6..22e91657f3fb 100644
> --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
> +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
> @@ -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) {
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-08 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 6:50 [PATCH] staging: r8188eu: do not spam the kernel log Michael Straube
2022-08-08 21:40 ` Philipp Hortmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox