]> git.baikalelectronics.ru Git - kernel.git/commit
dev_vdbg(), available with -DVERBOSE_DEBUG
authorDavid Brownell <david-b@pacbell.net>
Fri, 13 Jul 2007 05:08:22 +0000 (22:08 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 18 Jul 2007 22:49:50 +0000 (15:49 -0700)
commit7deff55a66582919e6f016e76ccfb3adc111119a
tree3e9d53857d610d2b7eab3e2cce3cae2220202f52
parent8adc7c0ab54362fce0e2933f2c5127503518cc7e
dev_vdbg(), available with -DVERBOSE_DEBUG

This defines a dev_vdbg() call, which is enabled with -DVERBOSE_DEBUG.
When enabled, dev_vdbg() acts just like dev_dbg().  When disabled, it is a
NOP ...  just like dev_dbg() without -DDEBUG.  The specific code was moved
out of a USB patch, but lots of drivers have similar support.

That is, code can now be written to use an additional level of debug
output, selected at compile time.  Many driver authors have found this
idiom to be very useful.  A typical usage model is for "normal" debug
messages to focus on fault paths and not be very "chatty", so that those
messages can be left on during normal operation without much of a
performance or syslog load.  On the other hand "verbose" messages would be
noisy enough that they wouldn't normally be enabled; they might even affect
timings enough to change system or driver behavior.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
include/linux/device.h