* [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk()
@ 2020-03-11 19:16 Lourdes Pedrajas
2020-03-11 19:51 ` [Outreachy kernel] " Julia Lawall
2020-03-12 8:20 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Lourdes Pedrajas @ 2020-03-11 19:16 UTC (permalink / raw)
To: outreachy-kernel, gregkh; +Cc: 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.
Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
---
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(-)
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 0118edb0b9ab..09ab68865934 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Outreachy kernel] [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk()
2020-03-11 19:16 [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk() Lourdes Pedrajas
@ 2020-03-11 19:51 ` Julia Lawall
2020-03-12 8:20 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2020-03-11 19:51 UTC (permalink / raw)
To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh
On Wed, 11 Mar 2020, Lourdes Pedrajas wrote:
> 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.
>
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> ---
> 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
>
> drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
> index 0118edb0b9ab..09ab68865934 100644
> --- a/drivers/staging/rtl8192u/r8192U_wx.c
> +++ b/drivers/staging/rtl8192u/r8192U_wx.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200311191638.27974-1-lu%40pplo.net.
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk()
2020-03-11 19:16 [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk() Lourdes Pedrajas
2020-03-11 19:51 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-12 8:20 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-03-12 8:20 UTC (permalink / raw)
To: Lourdes Pedrajas; +Cc: outreachy-kernel
On Wed, Mar 11, 2020 at 08:16:38PM +0100, Lourdes Pedrajas wrote:
> 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.
>
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-12 8:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-11 19:16 [PATCH v3] staging: rtl8192u: r8192U_wx: use pr_warn() instead of printk() Lourdes Pedrajas
2020-03-11 19:51 ` [Outreachy kernel] " Julia Lawall
2020-03-12 8:20 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.