From: Joe Perches <joe@perches.com>
To: Eugene Krasnikov <k.eugene.e@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
"John W. Linville" <linville@tuxdriver.com>,
wcn36xx <wcn36xx@lists.infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
netdev@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
ath5k-devel@lists.ath5k.org,
ath9k-devel <ath9k-devel@lists.ath9k.org>,
ath10k@lists.infradead.org, Kalle Valo <kvalo@qca.qualcomm.com>,
wil6210@qca.qualcomm.com
Subject: Re: [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon
Date: Thu, 07 Nov 2013 11:40:21 -0800 [thread overview]
Message-ID: <1383853221.9263.14.camel@joe-AO722> (raw)
In-Reply-To: <CAFSJ42Y-3BZqj+JRNa8wdxjnm1fguD8ToH5Oj0m56yT5NexdVQ@mail.gmail.com>
On Thu, 2013-11-07 at 07:32 +0000, Eugene Krasnikov wrote:
> Hi Joe,
Hi Eugene.
> I personally like the idea of making some kind of framework on top of
> printing because all ath drivers are using the same printing approach
> and combining all that code in one place will reduce amount of code in
> each particular driver. As a true engineer i like when it's less code
> = less work to do = less bugs:)
>
> Suggestion is to send a patch with semicolon fix only
It's a one line fix, and pretty trivial to do yourself if you
want it.
I do think though the slightly odd wcn36xx_<level> uses of:
-#define wcn36xx_err(fmt, arg...) \
- printk(KERN_ERR pr_fmt("ERROR " fmt), ##arg);
-
-#define wcn36xx_warn(fmt, arg...) \
- printk(KERN_WARNING pr_fmt("WARNING " fmt), ##arg)
-
-#define wcn36xx_info(fmt, arg...) \
- printk(KERN_INFO pr_fmt(fmt), ##arg)
-
[]
+#define wcn36xx_err(fmt, ...) \
+ pr_err("ERROR " fmt, ##__VA_ARGS__)
+#define wcn36xx_warn(fmt, ...) \
+ pr_warn("WARNING " fmt, ##__VA_ARGS__)
+#define wcn36xx_info(fmt, ...) \
+ pr_info(fmt, ##__VA_ARGS__)
should still be converted to more normal pr_<level> like I did.
I don't believe that prefixing of "ERROR " and "WARNING " to
pr_err and pr_warn actually gain anything as the same level
information can be got already with dmesg -r via the "<3>" and
"<4>" prefixes or dmesg -l3 -l4
> have a
> second round of convincing ath guys to change printing code. How does
> that sound?
Luis? Kalle? Other Qualcomm/Atheros folk?
One of the nominal benefits of separating the ath_<level>
macros by subsystem was perf/tracing. I believe some of the
ath subsystems have integrated the dmesg and tracing code.
I'm not sure how separable those may be here or if it's even
desirable to separate them. I'd guess not.
next prev parent reply other threads:[~2013-11-07 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 20:40 [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon Joe Perches
2013-11-06 7:49 ` Eugene Krasnikov
2013-11-06 17:55 ` Joe Perches
2013-11-07 7:32 ` Eugene Krasnikov
2013-11-07 19:40 ` Joe Perches [this message]
2013-11-08 7:06 ` Kalle Valo
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=1383853221.9263.14.camel@joe-AO722 \
--to=joe@perches.com \
--cc=ath10k@lists.infradead.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=k.eugene.e@gmail.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=wcn36xx@lists.infradead.org \
--cc=wil6210@qca.qualcomm.com \
/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).