Daniel Drake wrote:

I am new to kernel development (any comments on what I've just done appreciated!), and I noticed that quite a lot of other USB drivers have commented out lines such as
//#define DEBUG
//#define VERBOSE

DEBUG is used (#ifdef/#ifndef) in several places to control whether extra information (ideally just for faults, sometimes for successes) goes to the log stream: pr_debug(), dev_dbg(), the new network ones, the old usb.h dbg(), and so on. When it's not defined, the kernel code shrinks.

Usage varies, consistency would often be useful.  There does seem to
be a rule of thumb that without editing source code to enable messages,
the extra log data should only cover initialization and real faults ...
avoiding success messages, since their volume is usually excessive.

So my drivers kick in some more diagnostics if CONFIG_USB_DEBUG is
there (which kicks in DEBUG), and will become chatty if VERBOSE is
enabled by hand.  While things like the driver model code are
normally silent, but if you enable DEBUG by hand, it gets chatty.

- Dave



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to