[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug
Randy Dunlap wrote:
> Hi,
> Doesn't this move printk-debug control from local source files
> (i.e., targeted, specific ones) to a more global control (DEBUG)?
> If so, I don't see that as a generally good thing.
> If not, please correct me and tell me how this is useful to just
> one instance of using pr_debug() in say, ncpfs, without pr_debug()
> being enabled throughout the entire kernel tree.
> Thanks.

I can certainly see that point but using pr_debug means that all the
debug print statements are centralised so that changes to the format
could be more uniform. For example, it would be very easy to change the
macro to print the function name it was called from followed by the message.

The only DPRINTK's with specific DEBUGs were alternative.c, which had an
extra if, and ncpfs which had an extra #ifdef DEBUG_NCP. The alternative
solution would be to change the #defines to use pr_debug rather than
printk directly:

#define DPRINTK(format, args...) \
pr_debug(format, ##args);

The advantage would be maitaining subsystem specific debug control with
centralised format control.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-06-10 21:33    [W:0.146 / U:5.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site