dprintk should evaluate to printk(KERN_DEBUG ...). Beyond that, what
are you suggesting? Take a look at DPRINTK in drivers/video/{various}.
It does nice stuff like prefix your output with the function name.
A per-module switch is necessary to have fine grained control over
whether or not you have tons and tons of debugging text and code
compiled into the module. Feel free to put the switch anywhere you
want. I think it would be cool to do it from make config:
Floppy driver? [y/n/m] yd
( defines CONFIG_FLOPPY, DBG_CONFIG_FLOPPY )
Rather than implementing this DPRINTK() and assert() in every module in
drivers/video/* and elsewhere, it makes sense to move the code into a
common location. With all the pointers de-ref'd in C code and the
kernel in particular, using assert() around that type of code has saved
me lots of debugging time more than once. asserts() are usually cheap
so it doesn't kill you to leave them on during runtime.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/