staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
PATCH v4 1/1 staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
printk() is deprecated, use netdev_warn() instead, which is a message printing function specific for network devices and uses net_device data structure, defined in include/linux/netdevice.h. Issue found by checkpatch.
---
Changes since v3:
- use netdev_warn() correcly
drivers/staging/rtl8192u/r8192U_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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" ); +netdev_warn (dev,"wrong type in WEP, not WEP40 and WEP104\n" ); } }
Signature · 1 line
2.17.1
Quoted 3 lines · Lourdes Pedrajas
printk()is deprecated, usenetdev_warn()instead, which is a message printing function specific for network devices and usesnet_devicedata structure, defined ininclude/linux/netdevice.h. Issue found by checkpatch.
I think that you could drop the part about the net_device structure. The netdev debug functions are widley used in networking code, so anyone interested in the patch should know about them already.
julia
Quoted 32 lines
Suggested-by Julia Lawall <[email protected]>Suggested-by Stefano Brivio <[email protected]>Signed-off-by Lourdes Pedrajas <[email protected]>---
Changes since v3:
- usenetdev_warn()correclydrivers/staging/rtl8192u/r8192U_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192u/r8192U_wx.c +1
-2@@ -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" ); +netdev_warn (dev,"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/20200312161548.5631-1-lu%40pplo.net.
Quoted 8 lines · Julia Lawall
Quoted 3 lines · Lourdes Pedrajas
printk()is deprecated, usenetdev_warn()instead, which is a message printing function specific for network devices and usesnet_devicedata structure, defined ininclude/linux/netdevice.h. Issue found by checkpatch.
Quoted 6 lines
I think that you could drop the part about the
net_devicestructure. The netdev debug functions are widley used in networking code, so anyone interested in the patch should know about them already.julia
I agree, thank you for your help!
Lourdes