staging: rtl8192e: Replace printk with netdev_info
PATCH 1/1 staging: rtl8192e: Replace printk with netdev_info
Replace printk(KERN_INFO...) by netdev_info for more uniform error reporting. Issue found by checkpatch.
--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl819x_TSProc.c +1 -1
@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);
Signature · 1 line
1.7.10.4
Greg KH
maintainerQuoted 13 lines · Marianne Moeller Knudsen
Replace
printk(KERN_INFO...)bynetdev_infofor more uniform error reporting. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/rtl819x_TSProc.c +0
-0
drivers/staging/rtl8192e/rtl819x_TSProc.c void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr) · line 485
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c +1
-1@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);
Someone already sent this patch before you did :(
Quoted 15 lines · Greg KH
Quoted 14 lines · Marianne Moeller Knudsen
Replace
printk(KERN_INFO...)bynetdev_infofor more uniform error reporting. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/rtl819x_TSProc.c +0
-0@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
Quoted 9 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr) · line 485
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c +1
-1list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);Someone already sent this patch before you did :(
Out of curiosity: All the other prints in this file uses RTLLIB_DEBUG. Could it be assumed that they could be used here as well? Something like RTLLIB_DEBUG(RLTLIB_DL_TS, ....)?
Quoted 26 lines · Marianne Moeller Knudsen
Quoted 15 lines · Greg KH
Quoted 14 lines · Marianne Moeller Knudsen
Replace
printk(KERN_INFO...)bynetdev_infofor more uniform error reporting. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/rtl819x_TSProc.c +0
-0@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)Quoted 9 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr) · line 485
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c +1
-1list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);Someone already sent this patch before you did :(
Quoted 3 lines
Out of curiosity: All the other prints in this file uses
RTLLIB_DEBUG. Could it be assumed that they could be used here as well? Something likeRTLLIB_DEBUG(RLTLIB_DL_TS, ....)?
Your goal should be to get rid of RTLLIB_DEBUG, and replace them with standard kernel functions (dev_err, etc).
julia
Quoted 30 lines · Julia Lawall
Quoted 26 lines · Marianne Moeller Knudsen
Quoted 24 lines · Greg KH
Quoted 13 lines · Marianne Moeller Knudsen
Replace
printk(KERN_INFO...)bynetdev_infofor more uniform error reporting. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/rtl819x_TSProc.c +0
-0drivers/staging/rtl8192e/rtl819x_TSProc.c void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr) · line 485
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c +1
-1@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);Someone already sent this patch before you did :(
Quoted 8 lines
Quoted 3 lines
Out of curiosity: All the other prints in this file uses
RTLLIB_DEBUG. Could it be assumed that they could be used here as well? Something likeRTLLIB_DEBUG(RLTLIB_DL_TS, ....)?Your goal should be to get rid of
RTLLIB_DEBUG, and replace them with standard kernel functions (dev_err, etc).julia
Aha yes duly noted.
Quoted 30 lines · Julia Lawall
Quoted 26 lines · Marianne Moeller Knudsen
Quoted 24 lines · Greg KH
Quoted 13 lines · Marianne Moeller Knudsen
Replace
printk(KERN_INFO...)bynetdev_infofor more uniform error reporting. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/rtl819x_TSProc.c +0
-0drivers/staging/rtl8192e/rtl819x_TSProc.c void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr) · line 485
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_TSProc.c +1
-1@@ -479,7 +479,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)list_for_each_entry_safe (pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {if (memcmp (pTS->Addr, Addr,6 ) ==0 ) { -printk (KERN_INFO "====>remove Tx_TS_admin_list\n" ); +netdev_info (ieee->dev,"====>remove Tx_TS_admin_list\n" );RemoveTsEntry (ieee, pTS,TX_DIR );list_del_init (&pTS->List);list_add_tail (&pTS->List, &ieee->Tx_TS_Unused_List);Someone already sent this patch before you did :(
Quoted 6 lines
Quoted 3 lines
Out of curiosity: All the other prints in this file uses
RTLLIB_DEBUG. Could it be assumed that they could be used here as well? Something likeRTLLIB_DEBUG(RLTLIB_DL_TS, ....)?Your goal should be to get rid of
RTLLIB_DEBUG, and replace them with standard kernel functions (dev_err, etc).
Note that RTLLIB_DEBUG is used to select the debug print levels based on a module parameter. Switching them over to always using netdev_debug() is not necessarily desirable.
To a large extent it will depend on what the maintainer/developer needs them for. It might be possible to clean them up and make them prettier, but just pulling them out and replacing them with netdev_foo() needs consideration first.
Cheers,
Jes