Skip to contentSkip to conversation

staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk()

PATCH Superseded Lourdes Pedrajas 3 participants 3 messages Mar 11, 2020 – Mar 12, 2020 Staging

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk()

printk() is deprecated, use pr_warn() instead, which is a message printing function for network devices, defined in include/linux/netdevice.h. Issue found by checkpatch.

---
Changes since v2:
- Correct the subject line from v1 and use the generic pr_warn() since netdev_warn() expect a pointer to a net device.

 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_wx.c +1 -1
index 0118edb0b9ab..09ab68865934 100644
@@ -588,7 +588,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
 				hwkey);                 /* KeyContent */
 
 		} else {
-			printk("wrong type in WEP, not WEP40 and WEP104\n");
+			pr_warn("wrong type in WEP, not WEP40 and WEP104\n");
 		}
 
 	}
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Lourdes Pedrajas

printk() is deprecated, use pr_warn() instead, which is a message printing function for network devices, defined in include/linux/netdevice.h. Issue found by checkpatch.

---
Changes since v2:
- Correct the subject line from v1 and use the generic pr_warn() since netdev_warn() expect a pointer to a net device.

The dev parameter of the enclosing function is not suitable?

julia

Quoted 25 lines
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_wx.c +1 -2
index 0118edb0b9ab..09ab68865934 100644
@@ -588,7 +588,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
 				hwkey);                 /* KeyContent */
 
 		} else {
-			printk("wrong type in WEP, not WEP40 and WEP104\n");
+			pr_warn("wrong type in WEP, not WEP40 and WEP104\n");
 		}
 
 	}
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200311191638.27974-1-lu%40pplo.net.

maintainer
#2 lore raw
In reply to Lourdes Pedrajas
Quoted 9 lines · Lourdes Pedrajas

printk() is deprecated, use pr_warn() instead, which is a message printing function for network devices, defined in include/linux/netdevice.h. Issue found by checkpatch.

---
Changes since v2:
- Correct the subject line from v1 and use the generic pr_warn() since netdev_warn() expect a pointer to a net device.

As Julia pointed out, this is not correct, you can use netdev_warn() here.

thanks,

greg k-h