* Re: [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon
[not found] ` <CAFSJ42YQy96Sko8CuG9BGjHzTV7TkRp2=NVt036APxSKpPB=Ag@mail.gmail.com>
@ 2013-11-06 17:55 ` Joe Perches
2013-11-07 7:32 ` Eugene Krasnikov
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-11-06 17:55 UTC (permalink / raw)
To: Eugene Krasnikov, Luis R. Rodriguez
Cc: netdev, ath5k-devel, linux-wireless, John W. Linville, ath10k,
linux-kernel@vger.kernel.org, ath9k-devel, wcn36xx
On Wed, 2013-11-06 at 07:49 +0000, Eugene Krasnikov wrote:
> Hm... when it comes to semicolon the patch seems to be good. When it
> comes to dynamic debugging i think we should have a separate
> discussion about that.
> I personally like the whole idea about dynamic debug but if you want
> to change it i would suggest to have some kind of framework for all
> ath drivers(or maybe all wireless drivers). Because obviously you can
> find common code in every driver that defines it's own debug
> functions/debug levels and so on. Why not to make a framework with
> standard API/levels?
You need to bring that up with the Atheros folk.
I've tried. The view seemed to be it was more
trouble than it was worth.
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon
2013-11-06 17:55 ` [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon Joe Perches
@ 2013-11-07 7:32 ` Eugene Krasnikov
2013-11-07 19:40 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Eugene Krasnikov @ 2013-11-07 7:32 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, ath5k-devel, linux-wireless, John W. Linville, ath10k,
linux-kernel@vger.kernel.org, Luis R. Rodriguez, ath9k-devel,
wcn36xx
Hi Joe,
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 and have a
second round of convincing ath guys to change printing code. How does
that sound?
On Wed, Nov 6, 2013 at 5:55 PM, Joe Perches <joe@perches.com> wrote:
> On Wed, 2013-11-06 at 07:49 +0000, Eugene Krasnikov wrote:
>> Hm... when it comes to semicolon the patch seems to be good. When it
>> comes to dynamic debugging i think we should have a separate
>> discussion about that.
>> I personally like the whole idea about dynamic debug but if you want
>> to change it i would suggest to have some kind of framework for all
>> ath drivers(or maybe all wireless drivers). Because obviously you can
>> find common code in every driver that defines it's own debug
>> functions/debug levels and so on. Why not to make a framework with
>> standard API/levels?
>
> You need to bring that up with the Atheros folk.
> I've tried. The view seemed to be it was more
> trouble than it was worth.
>
>
>
--
Best regards,
Eugene
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon
2013-11-07 7:32 ` Eugene Krasnikov
@ 2013-11-07 19:40 ` Joe Perches
2013-11-08 7:06 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-11-07 19:40 UTC (permalink / raw)
To: Eugene Krasnikov
Cc: wil6210, netdev, ath5k-devel, linux-wireless, John W. Linville,
ath10k, linux-kernel@vger.kernel.org, Luis R. Rodriguez,
ath9k-devel, Kalle Valo, wcn36xx
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.
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon
2013-11-07 19:40 ` Joe Perches
@ 2013-11-08 7:06 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2013-11-08 7:06 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, wil6210, netdev, ath5k-devel,
linux-wireless, John W. Linville, ath10k, Luis R. Rodriguez,
ath9k-devel, wcn36xx, Eugene Krasnikov
Joe Perches <joe@perches.com> writes:
>> have a
>> second round of convincing ath guys to change printing code. How does
>> that sound?
>
> Luis? Kalle? Other Qualcomm/Atheros folk?
I didn't quite get what you are asking from me. But for me most
important is that the current debugging facilities from user's point of
view don't change. I don't care if the code is in ath10k.ko or ath.ko,
we are talking about ~100 lines of code anyway.
> One of the nominal benefits of separating the ath_<level>
> macros by subsystem was perf/tracing.
Nominal?
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-08 7:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1383684000.4387.42.camel@joe-AO722>
[not found] ` <CAFSJ42YQy96Sko8CuG9BGjHzTV7TkRp2=NVt036APxSKpPB=Ag@mail.gmail.com>
2013-11-06 17:55 ` [PATCH] wcn36xx: Fix logging macro with unnecessary semicolon Joe Perches
2013-11-07 7:32 ` Eugene Krasnikov
2013-11-07 19:40 ` Joe Perches
2013-11-08 7:06 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox