On Friday 12 September 2003 18:35, Oliver Neukum wrote:
> > > No, I will not take a patch that adds any new BUG* calls to the usb
> > > code.  I know you already have some in this driver, and that really is
> > > unacceptable.  Device drivers should not shut down a system if they can
> > > help it at all.  The original code that returns an error code is
> > > correct.
> > >
> > > I will gladly take patches to remove the other calls to BUG_ON() in
> > > this driver (hint...)
> >
> > Something like this?
>
> Won't the compiler optimise this away in any case?

Hi Oliver, I'm not sure what you are referring to.  If you compile with
DEBUG defined, then code is produced that checks the condition and
BUGs if it is not satisfied.  If DEBUG is not defined then my compiler
only produces code for the side-effects (these exist in some of the
DEBUG_ON statements), and none for checking the condition etc.
The funny form - do { if (x); } while (0) - prevents the compiler from
warning about unused expressions.

Ciao,

Duncan.


-------------------------------------------------------
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