Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()
From: Greg KH
Date: Tue Jun 25 2013 - 13:38:47 EST
On Tue, Jun 25, 2013 at 10:29:50AM -0700, Joe Perches wrote:
> On Tue, 2013-06-25 at 10:02 -0700, Greg KH wrote:
> > On Tue, Jun 25, 2013 at 05:30:02PM +0100, Rupesh Gujare wrote:
> > > convert all debug messages from printk to dev_dbg() & add kernel config to
> > > enable/disable these messages during compilation.
>
> > No, just use the built-in dynamic debug code in the kernel, no need to
> > provide any new macros or functions or most importantly, no new Kconfig
> > options.
>
> I think the Kconfig option is pretty poor too but a
> long needed extension to dev_dbg is to enable classes
> of messages by level or mask.
>
> There are many existing macros like
>
> #define module_dbg(level, fmt, ...)
> do {
> if (level >= some_module_var)
> debug_something(...);
> } while (0)
>
> and
>
> #define module_dbg(mask, fmt, ...)
> do {
> if (mask & some_module_var)
> debug_something(...)
> } while (0)
>
> It'd be nice to consolidate those in dev_dbg
I'd almost recommend that all of them just be removed, because most of
them were only used for debugging the code the first time it was
developed, right? Only for very limited usages would this type of thing
be needed.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/