-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 18 Oct 2002 03:54, David Brownell wrote: > > And you should also apply this to some other portions of the code, like > > usb_submit_urb(), it has extra checks when CONFIG_USB_DEBUG is enabled. > > Yes, and I suspect there are a few BUG() or BUG_ON() checks in various > drivers that should be #ifdeffed too. This is possibly the exception to my rule (see below:)
> Why make this specific to the core and hcd code, by the way? Surely > all drivers should have such a DEBUGGING mode. This isn't "hardening" > in the telecoms sense, monitoring for failures/rates/etc, it's just > driver debugging support, to make sure the APIs are observed. > > FWIW I'd rather see something like > > CONFIG_USB_VERBOSE ... what's today's config menus describe Agree. This means "vary what is logged" > CONFIG_USB_DEBUG ... the real point of that 'hardening' code Not so sure. If people bothered to write code that validates input to functions, why disable it? The only reasons that I can see are: 1. unacceptable performance penalty for some checks (probably not, an unlikely() should help with any branch prediction problems). If this is the case, maybe CONFIG_USB_DEBUG should have suboptions for each of the too-expensive checks (or class of expensive checks). 2. unacceptable user reaction (probably not, unless we are incurring performance problems (see 1) or hitting BUG() in production code, where the problem could be worked around). See extended discussion of why BUG() is a bad idea on L-U-D and LKML a while ago. So why keep DEBUG at all? Brad - -- http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9rxfdW6pHgIdAuOMRAuYUAKCqbhWPqsUvN3MmmhNghbhJfm6aSACdGK04 MNtSpfY4KsB0YAwF+teHZz8= =sdB6 -----END PGP SIGNATURE----- ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel