lkml.org 
[lkml]   [2008]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: driver probe error reporting
Date
On Wednesday, 17 of December 2008, Greg KH wrote:
> On Mon, Dec 15, 2008 at 11:15:02PM +0000, Ben Dooks wrote:
> > This runs on from the discussion in [1] on how drivers (especially
> > one using a variant of the device driver framework) report errors
> > on probe. There are two main classes of errors, the type which happen
> > at probe time (device not responding, not enough memory, etc) and
> > errors that are due to configuration such as missing device configuration
> > data.
> >
> > It has been suggested that using dev_err() to report any configuration
> > data error is a bloat of code as a properly debugged kernel should never
> > find itself in this state.
> >
> > Unfortunatley the only diagnostic dev_xxx() macro is dev_dbg() which is
> > only available if the the driver code itself defines DEBUG. I would think
> > it would be better to have a macro that can be turned on/off by a kernel
> > configuration for when debugging which turns on the messages that are
> > important to developers creating new machine/arch support but disabled
> > for shipping kernels.
>
> Not anymore, dev_dbg() can be dynamically switched on and off at runtime
> in 2.6.28.

IMO, there's a problem with that, because it turns on _all_ of the debug info
from the entire kernel, which is _never_ necessary. Almost always you need
debug output for specific subsystem, if not for specific driver, and all of the
superfluous debug data resulting from the "dynamic printk" only makes things
harder.

Thanks,
Rafael


\
 
 \ /
  Last update: 2008-12-17 13:47    [W:0.676 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site