* [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk @ 2017-09-19 19:54 Georgiana Chelu 2017-09-19 20:28 ` [Outreachy kernel] " Julia Lawall 0 siblings, 1 reply; 6+ messages in thread From: Georgiana Chelu @ 2017-09-19 19:54 UTC (permalink / raw) To: outreachy-kernel; +Cc: gregkh Replace printk with netdev_info because struct ieee80211_device contains a net_device structure. Issue found by checkpatch.pl script. WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> --- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 8aa38dcf0dfd..0f86195680e8 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -143,7 +143,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P if (ACT_ADDBARSP == type) { // Status Code - printk(KERN_INFO "=====>to send ADDBARSP\n"); + netdev_info(ieee->dev, "=====>to send ADDBARSP\n"); put_unaligned_le16(StatusCode, tag); tag += 2; @@ -345,7 +345,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) pBaTimeoutVal = (u16 *)(tag + 5); pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); - printk(KERN_INFO "====================>rx ADDBAREQ from :%pM\n", dst); + netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst); //some other capability is not ready now. if ((ieee->current_network.qos_data.active == 0) || (!ieee->pHTInfo->bCurrentHTSupport)) //|| -- 2.11.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk 2017-09-19 19:54 [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk Georgiana Chelu @ 2017-09-19 20:28 ` Julia Lawall 2017-09-19 22:37 ` Georgiana Chelu 0 siblings, 1 reply; 6+ messages in thread From: Julia Lawall @ 2017-09-19 20:28 UTC (permalink / raw) To: Georgiana Chelu; +Cc: outreachy-kernel, gregkh On Tue, 19 Sep 2017, Georgiana Chelu wrote: > Replace printk with netdev_info because struct ieee80211_device > contains a net_device structure. > > Issue found by checkpatch.pl script. > WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then > dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... > > Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Maybe all the locally defined debug levels are not really needed, and the calls to the debug macros could also be replaced by appropriate calls to netdev logging functions. julia > --- > drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > index 8aa38dcf0dfd..0f86195680e8 100644 > --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > @@ -143,7 +143,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P > > if (ACT_ADDBARSP == type) { > // Status Code > - printk(KERN_INFO "=====>to send ADDBARSP\n"); > + netdev_info(ieee->dev, "=====>to send ADDBARSP\n"); > > put_unaligned_le16(StatusCode, tag); > tag += 2; > @@ -345,7 +345,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) > pBaTimeoutVal = (u16 *)(tag + 5); > pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); > > - printk(KERN_INFO "====================>rx ADDBAREQ from :%pM\n", dst); > + netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst); > //some other capability is not ready now. > if ((ieee->current_network.qos_data.active == 0) || > (!ieee->pHTInfo->bCurrentHTSupport)) //|| > -- > 2.11.0 > > -- > 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 post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170919195406.n6kztu5q3pnduhir%40fireworks. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk 2017-09-19 20:28 ` [Outreachy kernel] " Julia Lawall @ 2017-09-19 22:37 ` Georgiana Chelu 2017-09-20 9:06 ` Julia Lawall 0 siblings, 1 reply; 6+ messages in thread From: Georgiana Chelu @ 2017-09-19 22:37 UTC (permalink / raw) To: Julia Lawall; +Cc: outreachy-kernel, Greg KH On 19 September 2017 at 23:28, Julia Lawall <julia.lawall@lip6.fr> wrote: > > > On Tue, 19 Sep 2017, Georgiana Chelu wrote: > >> Replace printk with netdev_info because struct ieee80211_device >> contains a net_device structure. >> >> Issue found by checkpatch.pl script. >> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then >> dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... >> >> Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> > > Acked-by: Julia Lawall <julia.lawall@lip6.fr> > > Maybe all the locally defined debug levels are not really needed, and the > calls to the debug macros could also be replaced by appropriate calls to > netdev logging functions. > > julia I think there are two options: 1. Replace IEEE80211_DEBUG(IEEE80211_DL_ERR, ...) occurrences with netdev_err(dev, ...), but these debug messages are shown only when CONFIG_IEEE80211_DEBUG is defined in the kernel configuration. 2. Change the IEEE80211_DEBUG macro to use netdev_* instead of printk. But, that would require extra checking in order to use the correct netdev_* macro. extern u32 ieee80211_debug_level; #define IEEE80211_DEBUG(level, fmt, args...) \ do { if (ieee80211_debug_level & (level)) \ printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0) So, what is your opinion? Thank you, Georgiana > >> --- >> drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> index 8aa38dcf0dfd..0f86195680e8 100644 >> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> @@ -143,7 +143,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P >> >> if (ACT_ADDBARSP == type) { >> // Status Code >> - printk(KERN_INFO "=====>to send ADDBARSP\n"); >> + netdev_info(ieee->dev, "=====>to send ADDBARSP\n"); >> >> put_unaligned_le16(StatusCode, tag); >> tag += 2; >> @@ -345,7 +345,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) >> pBaTimeoutVal = (u16 *)(tag + 5); >> pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); >> >> - printk(KERN_INFO "====================>rx ADDBAREQ from :%pM\n", dst); >> + netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst); >> //some other capability is not ready now. >> if ((ieee->current_network.qos_data.active == 0) || >> (!ieee->pHTInfo->bCurrentHTSupport)) //|| >> -- >> 2.11.0 >> >> -- >> 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 post to this group, send email to outreachy-kernel@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170919195406.n6kztu5q3pnduhir%40fireworks. >> For more options, visit https://groups.google.com/d/optout. >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk 2017-09-19 22:37 ` Georgiana Chelu @ 2017-09-20 9:06 ` Julia Lawall 2017-09-23 21:18 ` Georgiana Chelu 0 siblings, 1 reply; 6+ messages in thread From: Julia Lawall @ 2017-09-20 9:06 UTC (permalink / raw) To: Georgiana Chelu; +Cc: outreachy-kernel, Greg KH On Wed, 20 Sep 2017, Georgiana Chelu wrote: > On 19 September 2017 at 23:28, Julia Lawall <julia.lawall@lip6.fr> wrote: > > > > > > On Tue, 19 Sep 2017, Georgiana Chelu wrote: > > > >> Replace printk with netdev_info because struct ieee80211_device > >> contains a net_device structure. > >> > >> Issue found by checkpatch.pl script. > >> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then > >> dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... > >> > >> Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> > > > > Acked-by: Julia Lawall <julia.lawall@lip6.fr> > > > > Maybe all the locally defined debug levels are not really needed, and the > > calls to the debug macros could also be replaced by appropriate calls to > > netdev logging functions. > > > > julia > > I think there are two options: > > 1. Replace IEEE80211_DEBUG(IEEE80211_DL_ERR, ...) occurrences with > netdev_err(dev, ...), > but these debug messages are shown only when CONFIG_IEEE80211_DEBUG is defined > in the kernel configuration. > > 2. Change the IEEE80211_DEBUG macro to use netdev_* instead of printk. > But, that would require extra checking in order to use the correct > netdev_* macro. > > > extern u32 ieee80211_debug_level; > #define IEEE80211_DEBUG(level, fmt, args...) \ > do { if (ieee80211_debug_level & (level)) \ > printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0) > > > So, what is your opinion? One option would be to drop the whole mess and put everything at _debug, because everything was ultimately done with KERN_DEBUG before. Unfortunately this code doesn't seem to have a specific maintainer who might know whether all the debugging messages are still useful. Perhaps Greg would have an opinion. julia > > Thank you, > Georgiana > > > > >> --- > >> drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > >> index 8aa38dcf0dfd..0f86195680e8 100644 > >> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > >> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c > >> @@ -143,7 +143,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P > >> > >> if (ACT_ADDBARSP == type) { > >> // Status Code > >> - printk(KERN_INFO "=====>to send ADDBARSP\n"); > >> + netdev_info(ieee->dev, "=====>to send ADDBARSP\n"); > >> > >> put_unaligned_le16(StatusCode, tag); > >> tag += 2; > >> @@ -345,7 +345,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) > >> pBaTimeoutVal = (u16 *)(tag + 5); > >> pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); > >> > >> - printk(KERN_INFO "====================>rx ADDBAREQ from :%pM\n", dst); > >> + netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst); > >> //some other capability is not ready now. > >> if ((ieee->current_network.qos_data.active == 0) || > >> (!ieee->pHTInfo->bCurrentHTSupport)) //|| > >> -- > >> 2.11.0 > >> > >> -- > >> 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 post to this group, send email to outreachy-kernel@googlegroups.com. > >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170919195406.n6kztu5q3pnduhir%40fireworks. > >> For more options, visit https://groups.google.com/d/optout. > >> > > -- > 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 post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CALta04zspRuf0a2ELBCYZOXK%3DK4UDkPTeEDJN%3DsUBYuZEzJbXg%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk 2017-09-20 9:06 ` Julia Lawall @ 2017-09-23 21:18 ` Georgiana Chelu 2017-09-29 13:18 ` Greg KH 0 siblings, 1 reply; 6+ messages in thread From: Georgiana Chelu @ 2017-09-23 21:18 UTC (permalink / raw) To: Julia Lawall; +Cc: outreachy-kernel, Greg KH On 20 September 2017 at 12:06, Julia Lawall <julia.lawall@lip6.fr> wrote: > > > On Wed, 20 Sep 2017, Georgiana Chelu wrote: > >> On 19 September 2017 at 23:28, Julia Lawall <julia.lawall@lip6.fr> wrote: >> > >> > >> > On Tue, 19 Sep 2017, Georgiana Chelu wrote: >> > >> >> Replace printk with netdev_info because struct ieee80211_device >> >> contains a net_device structure. >> >> >> >> Issue found by checkpatch.pl script. >> >> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then >> >> dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... >> >> >> >> Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> >> > >> > Acked-by: Julia Lawall <julia.lawall@lip6.fr> >> > >> > Maybe all the locally defined debug levels are not really needed, and the >> > calls to the debug macros could also be replaced by appropriate calls to >> > netdev logging functions. >> > >> > julia Hi Greg, Are debug levels still needed? As Julia pointed out, all IEEE80211_DEBUG_* macros use printk(KERN_*) in the end. Do you think it is useful and safe to replace these macros with netdev_*? Thank you, Georgiana >> >> I think there are two options: >> >> 1. Replace IEEE80211_DEBUG(IEEE80211_DL_ERR, ...) occurrences with >> netdev_err(dev, ...), >> but these debug messages are shown only when CONFIG_IEEE80211_DEBUG is defined >> in the kernel configuration. >> >> 2. Change the IEEE80211_DEBUG macro to use netdev_* instead of printk. >> But, that would require extra checking in order to use the correct >> netdev_* macro. >> >> >> extern u32 ieee80211_debug_level; >> #define IEEE80211_DEBUG(level, fmt, args...) \ >> do { if (ieee80211_debug_level & (level)) \ >> printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0) >> >> >> So, what is your opinion? > > One option would be to drop the whole mess and put everything at _debug, > because everything was ultimately done with KERN_DEBUG before. > Unfortunately this code doesn't seem to have a specific maintainer who > might know whether all the debugging messages are still useful. Perhaps > Greg would have an opinion. > > julia > >> >> Thank you, >> Georgiana >> >> > >> >> --- >> >> drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- >> >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> >> index 8aa38dcf0dfd..0f86195680e8 100644 >> >> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> >> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c >> >> @@ -143,7 +143,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P >> >> >> >> if (ACT_ADDBARSP == type) { >> >> // Status Code >> >> - printk(KERN_INFO "=====>to send ADDBARSP\n"); >> >> + netdev_info(ieee->dev, "=====>to send ADDBARSP\n"); >> >> >> >> put_unaligned_le16(StatusCode, tag); >> >> tag += 2; >> >> @@ -345,7 +345,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) >> >> pBaTimeoutVal = (u16 *)(tag + 5); >> >> pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); >> >> >> >> - printk(KERN_INFO "====================>rx ADDBAREQ from :%pM\n", dst); >> >> + netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst); >> >> //some other capability is not ready now. >> >> if ((ieee->current_network.qos_data.active == 0) || >> >> (!ieee->pHTInfo->bCurrentHTSupport)) //|| >> >> -- >> >> 2.11.0 >> >> >> >> -- >> >> 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 post to this group, send email to outreachy-kernel@googlegroups.com. >> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170919195406.n6kztu5q3pnduhir%40fireworks. >> >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> 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 post to this group, send email to outreachy-kernel@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CALta04zspRuf0a2ELBCYZOXK%3DK4UDkPTeEDJN%3DsUBYuZEzJbXg%40mail.gmail.com. >> For more options, visit https://groups.google.com/d/optout. >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk 2017-09-23 21:18 ` Georgiana Chelu @ 2017-09-29 13:18 ` Greg KH 0 siblings, 0 replies; 6+ messages in thread From: Greg KH @ 2017-09-29 13:18 UTC (permalink / raw) To: Georgiana Chelu; +Cc: Julia Lawall, outreachy-kernel On Sun, Sep 24, 2017 at 12:18:55AM +0300, Georgiana Chelu wrote: > On 20 September 2017 at 12:06, Julia Lawall <julia.lawall@lip6.fr> wrote: > > > > > > On Wed, 20 Sep 2017, Georgiana Chelu wrote: > > > >> On 19 September 2017 at 23:28, Julia Lawall <julia.lawall@lip6.fr> wrote: > >> > > >> > > >> > On Tue, 19 Sep 2017, Georgiana Chelu wrote: > >> > > >> >> Replace printk with netdev_info because struct ieee80211_device > >> >> contains a net_device structure. > >> >> > >> >> Issue found by checkpatch.pl script. > >> >> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then > >> >> dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... > >> >> > >> >> Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> > >> > > >> > Acked-by: Julia Lawall <julia.lawall@lip6.fr> > >> > > >> > Maybe all the locally defined debug levels are not really needed, and the > >> > calls to the debug macros could also be replaced by appropriate calls to > >> > netdev logging functions. > >> > > >> > julia > > Hi Greg, > > Are debug levels still needed? As Julia pointed out, all IEEE80211_DEBUG_* > macros use printk(KERN_*) in the end. Do you think it is useful and safe > to replace these macros with netdev_*? I really do not know, sorry. greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-29 13:18 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-09-19 19:54 [PATCH] Staging: rtl8192u: ieee80211: Use netdev_info instead of printk Georgiana Chelu 2017-09-19 20:28 ` [Outreachy kernel] " Julia Lawall 2017-09-19 22:37 ` Georgiana Chelu 2017-09-20 9:06 ` Julia Lawall 2017-09-23 21:18 ` Georgiana Chelu 2017-09-29 13:18 ` 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.