Re: [PATCH] mxl500x: Add module parameter to enable/disable debug messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 24, 2008 at 11:16:18PM -0400, Andy Walls wrote:
> +#define dprintk(level, fmt, arg...)                                       \
> +	do {                                                              \
> +		if (debug >= level)                                       \
> +			printk(KERN_DEBUG "%s: " fmt, "mxl500x", ## arg); \
> +	} while (0)

I think this code will be far more useful in kernel/printk.c rather
than every device driver and subsystem rolling their own (as seems to 
happen at this time).

Also see dev_dbg() and dev_printk() in include/linux/device.h.
What those macros are missing is what you have here - messages
printed or ignored depending on the value of a module variable
and/or parameter.

Nick.

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux