On Fri, Apr 19, 2002 at 11:06:56PM -0500, Timothy Jedlicka bonzopad wrote:
> I'm working on a patch for hpusbscsi.c to update the debugging statements and 
> allow them to be #ifdef (rather than hardcoded to "on" as they are now).  I 
> noted that usb.h has the dbg macro "#ifdef DEBUG", why isn't this
>  "#ifdef CONFIG_USB_DEBUG"?  When configing my kernel - I select 
> CONFIG_USB_DEBUG to expect to see these debug statements.  I can see the 
> argument that "DEBUG" is more generic so when recompiling individual modules 
> you may just choose DEBUG.  I don't know what the right answer is.  Opinions?

CONFIG_USB_DEBUG is mainly for the core USB code.  The USB drivers can
use the dbg() macro by simply defining DEBUG at the start of their
driver if they want to.  This makes it easy for developers to turn on or
off debugging statements as they work.

Yes it's not as well planned as it should be, but it works :)

Does this help?

I also recommend having a way to let the user select the debugging level
at run time, much like the usb-serial drivers do.  That way you don't
have to ask someone to recompile the driver if you want to get some
debugging output from them.  The ease of producing good debugging data
has really helped out the usb-serial driver development over time.

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to