All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	kvalo@codeaurora.org, Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt
Date: Sat, 17 Sep 2016 10:32:05 -0700	[thread overview]
Message-ID: <1474133525.32273.97.camel@perches.com> (raw)
In-Reply-To: <1474132155-9330-1-git-send-email-Larry.Finger@lwfinger.net>

On Sat, 2016-09-17 at 12:09 -0500, Larry Finger wrote:
> As soon as debugging is turned on, the logs are filled with messages
> reporting the interrupt status. As this quantity is usually zero, this
> output is not needed. In fact, there will be a report if the status is
> not zero, thus the debug line in question could probably be deleted.
> Rather than taking that action, I have changed it to only be printed
> when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.

There are many uses of
	if (rtl8xxxu_debug & <DEFINE>) {
		dev_info(dev, ...)

Emitting debugging information at KERN_INFO is odd.

I think it'd be nicer to use dev_dbg for all these cases
and as well use some new macro that includes the test

Something like:

#define rtl8xxxu_dbg(type, fmt, ...)			\
do {							\
	if (rtl8xxxu_debug & (type))			\
		dev_dbg(dev, fmt, ##__VA_ARGS__);	\
} while (0)

> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 9f6dbb4..236f33c 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -5260,7 +5260,8 @@ static void rtl8xxxu_int_complete(struct urb *urb)
>  	struct device *dev = &priv->udev->dev;
>  	int ret;
>  
> -	dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
> +	if (rtl8xxxu_debug & RTL8XXXU_DEBUG_USB)
> +		dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
>  	if (urb->status == 0) {
>  		usb_anchor_urb(urb, &priv->int_anchor);
>  		ret = usb_submit_urb(urb, GFP_ATOMIC);
> 
> 

  reply	other threads:[~2016-09-17 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-17 17:09 [PATCH] rtl8xxxu: Stop log spam from each successful interrupt Larry Finger
2016-09-17 17:32 ` Joe Perches [this message]
2016-09-17 20:58   ` Jes Sorensen
2016-09-18  8:02     ` Kalle Valo
2016-09-18 16:26       ` Jes Sorensen
2016-09-17 20:59 ` Jes Sorensen
2016-09-17 23:06   ` Larry Finger
2016-09-18 15:00     ` Jes Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474133525.32273.97.camel@perches.com \
    --to=joe@perches.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.