* [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
@ 2020-03-12 21:05 Lourdes Pedrajas
2020-03-13 7:04 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Lourdes Pedrajas @ 2020-03-12 21:05 UTC (permalink / raw)
To: outreachy-kernel, gregkh; +Cc: Lourdes Pedrajas
printk() is deprecated, use netdev_warn() instead, which is a message printing
function specific for network devices defined in include/linux/netdevice.h.
Issue found by checkpatch.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Suggested-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
---
Changes since v4:
- Log message correction.
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..100532598781 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");
+ netdev_warn(dev, "wrong type in WEP, not WEP40 and WEP104\n");
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
2020-03-12 21:05 [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk() Lourdes Pedrajas
@ 2020-03-13 7:04 ` Julia Lawall
2020-03-13 9:04 ` Lourdes Pedrajas
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2020-03-13 7:04 UTC (permalink / raw)
To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh
On Thu, 12 Mar 2020, Lourdes Pedrajas wrote:
> printk() is deprecated, use netdev_warn() instead, which is a message printing
> function specific for network devices defined in include/linux/netdevice.h.
I still don't think that "defined in include/linux/netdevice.h" is
necessary. It's a well known function, and anyway if I don't know what it
is, then grep or elixir is sufficient to find the definition.
julia
> Issue found by checkpatch.
>
> Suggested-by: Julia Lawall <julia.lawall@inria.fr>
> Suggested-by: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> ---
> Changes since v4:
> - Log message correction.
>
> 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..100532598781 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");
> + 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200312210540.9381-1-lu%40pplo.net.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
2020-03-13 7:04 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-13 9:04 ` Lourdes Pedrajas
0 siblings, 0 replies; 4+ messages in thread
From: Lourdes Pedrajas @ 2020-03-13 9:04 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel, gregkh
On Fri, Mar 13, 2020 at 08:04:44AM +0100, Julia Lawall wrote:
>
>
> On Thu, 12 Mar 2020, Lourdes Pedrajas wrote:
>
> > printk() is deprecated, use netdev_warn() instead, which is a message printing
> > function specific for network devices defined in include/linux/netdevice.h.
>
> I still don't think that "defined in include/linux/netdevice.h" is
> necessary. It's a well known function, and anyway if I don't know what it
> is, then grep or elixir is sufficient to find the definition.
>
> julia
>
Indeed, I am so sorry. Thank for your patience!
Lourdes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
2020-03-13 9:05 Lourdes Pedrajas
@ 2020-03-15 21:17 ` Stefano Brivio
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Brivio @ 2020-03-15 21:17 UTC (permalink / raw)
To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh
On Fri, 13 Mar 2020 10:05:44 +0100
Lourdes Pedrajas <lu@pplo.net> wrote:
> printk() is deprecated, use netdev_warn() instead, which is a message printing
> function specific for network devices.
> Issue found by checkpatch.
>
> Suggested-by: Julia Lawall <julia.lawall@inria.fr>
> Suggested-by: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> ---
> Changes since v4:
> - Log message correction.
>
> 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..100532598781 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");
> + netdev_warn(dev, "wrong type in WEP, not WEP40 and WEP104\n");
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
--
Stefano
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-15 21:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 21:05 [PATCH v5] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk() Lourdes Pedrajas
2020-03-13 7:04 ` [Outreachy kernel] " Julia Lawall
2020-03-13 9:04 ` Lourdes Pedrajas
2020-03-13 9:05 Lourdes Pedrajas
2020-03-15 21:17 ` [Outreachy kernel] " Stefano Brivio
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.