Skip to contentSkip to conversation

staging: rtl8192e: Replace printk with netdev_info

PATCH In review Marianne Moeller Knudsen 4 participants 6 messages Mar 23, 2015 – Mar 26, 2015 Staging

lore
Share & tools
lore
#0 lore raw

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
index c51f7e0..949cba4 100644
@@ -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
maintainer
#1 lore raw
Quoted 13 lines · Marianne Moeller Knudsen

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 +0 -0
index c51f7e0..949cba4 100644

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 :(

#2 lore raw
Quoted 15 lines · Greg KH
Quoted 14 lines · Marianne Moeller Knudsen

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 +0 -0
index c51f7e0..949cba4 100644
@@ -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 -1
 	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 :(

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, ....)?

#3 lore raw
Quoted 26 lines · Marianne Moeller Knudsen
Quoted 15 lines · Greg KH
Quoted 14 lines · Marianne Moeller Knudsen

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 +0 -0
index c51f7e0..949cba4 100644
@@ -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 -1
 	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 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 like RTLLIB_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

#4 lore raw
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...) 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 +0 -0
index c51f7e0..949cba4 100644

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 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 like RTLLIB_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.

#5 lore raw
In reply to Julia Lawall
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...) 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 +0 -0
index c51f7e0..949cba4 100644

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 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 like RTLLIB_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