From: Kalle Valo <kvalo@codeaurora.org>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: Joe Perches <joe@perches.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt
Date: Sun, 18 Sep 2016 11:02:44 +0300 [thread overview]
Message-ID: <8760pt7hzv.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <wrfjfuoymeez.fsf@redhat.com> (Jes Sorensen's message of "Sat, 17 Sep 2016 16:58:44 -0400")
Jes Sorensen <Jes.Sorensen@redhat.com> writes:
> Joe Perches <joe@perches.com> writes:
>> 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.
>
> Not at all, it's a pain to enable it in debug fs post loading the
> driver, especially if you need the output immediately during driver
> init. That is why the flags are there.
>
>> 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)
>
> Yuck yuck yuck, no thanks!
>
> Any attempt of adding that kinda grossness to the driver will get a
> NACK.
Huh, how is that ugly? To me it's the opposite, original code is ugly
and Joes' proposal makes sense. Lots of wireless drivers have something
similar.
--
Kalle Valo
next prev parent reply other threads:[~2016-09-18 8:02 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
2016-09-17 20:58 ` Jes Sorensen
2016-09-18 8:02 ` Kalle Valo [this message]
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=8760pt7hzv.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=joe@perches.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).