Skip to contentSkip to conversation

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

PATCH Superseded Lourdes Pedrajas 2 participants 3 messages Mar 10, 2020 Staging

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

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

printk() is deprecated, use pr_warn() instead. Change suggested by checkpatch.

---
 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 13 lines · Lourdes Pedrajas

printk() is deprecated, use pr_warn() instead. Change suggested by checkpatch.

---
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_wx.c +0 -0
index 0118edb0b9ab..09ab68865934 100644

drivers/staging/rtl8192u/r8192U_wx.c static int r8192_wx_set_enc(struct net_device *dev, · line 591

Quoted 5 lines
drivers/staging/rtl8192u/r8192U_wx.c +1 -1
@@ -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");

There is a specific message printing function for network device drivers.

To find out what it is, you can probably go to drivers/net and do a git grep for warn, or something like that.

julia

Quoted 11 lines
drivers/staging/rtl8192u/r8192U_wx.c +0 -1
 		}
 
 	}
--

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/20200310203251.2961-1-lu%40pplo.net.

#2 lore raw
Quoted 25 lines · Julia Lawall
Quoted 13 lines · Lourdes Pedrajas

printk() is deprecated, use pr_warn() instead. Change suggested by checkpatch.

---
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_wx.c +0 -0
index 0118edb0b9ab..09ab68865934 100644

drivers/staging/rtl8192u/r8192U_wx.c static int r8192_wx_set_enc(struct net_device *dev, · line 591

Quoted 5 lines
drivers/staging/rtl8192u/r8192U_wx.c +1 -1
@@ -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");

There is a specific message printing function for network device drivers.

Quoted 5 lines

To find out what it is, you can probably go to drivers/net and do a git grep for warn, or something like that.

julia

I agree, thank you for the hint!

Lourdes