Thread (95 messages) 95 messages, 9 authors, 2008-12-04

Re: [PATCH 05/39] wimax: debug macros and debug settings for the WiMAX stack

From: Inaky Perez-Gonzalez <hidden>
Date: 2008-12-03 02:11:31

On Thursday 27 November 2008, Johannes Berg wrote:
On Wed, 2008-11-26 at 15:07 -0800, Inaky Perez-Gonzalez wrote:
quoted
This file contains a simple debug framework that is used in the stack;
                       ^^^^^ ??
quoted
it allows the debug level to be controlled at compile-time (so the
debug code is optimized out) and at run-time (for what wasn't compiled
out).
Recently we got new stuff for dynamic printk
(include/linux/dynamic_printk.h) and pr_debug with a start format
(include/linux/kernel.h, pr_fmt); can you use any of that to make this
smaller? If not, I think you ought to argue why not, and possibly
improve the generic facility.
Yep, it was just too recent. I hadn't noticed it and I was told about
it a week ago. I just need to map it. It's on my plan to change it,
but I don't know if I'll have to do it for the push.
Personally, I'm tired of seeing every Intel driver come with a new huge
set of debugging macros that are barely understandable.
me too -- I am glad there is finally a common facility in the kernel
for it. 
quoted
+#define _d_printf(l, tag, dev, f, a...)					\
+do {									\
+	char head[64];							\
+	if (!d_test(l))							\
+		break;							\
+	__d_head(head, sizeof(head), dev);				\
+	printk(KERN_ERR "%s%s%s: " f, head, __func__, tag, ##a);	\
+} while (0 && dev)
That && dev is wrong.
Another remnant from a previous implementation -- killed, thanks

-- 
Inaky
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help