Am Donnerstag, 15. April 2004 10:47 schrieb Duncan Sands:
> > > Hi Oliver, I thought you meant that CONFIG_EMBEDDED made WARN_ON go
> > > away (or something like that). If you just mean that it is easy to
> > > redefine WARN_ON by hand, then all I can say is: it is also easy to
> > > redefine warn by hand! Anyway, I made you the following patch:
> >
> > Yes, but I don't trust gcc to optimise away the 'if' if you redefine
> > warn().
>
> The "if" cannot be optimized away for the case in point, because it
> does something (clears the bit) if it passes the test. If I used WARN_ON
> then it would have to be WARN_ON(1) in the else branch of the if.
True. You should use BUG_ON().
If this ever happens the device tree is screwed. There's no use going on.
> > But there is another point. The embedded people deserve a single switch
> > to remove assertion checks. The purpose of macros like WARN_ON() is
> > easy and _central_ choice of debugging output vs. kernel size.
>
> This is not an argument against using USB's warn, it is an argument for
> building warn on top of a centralized macro like WARN_ON or a friend.
It is an argument against USB making its own constructs. There's nothing
terribly specific about USB that would justify it. If the usual debug statements
are inadequate, improve them.
Regards
Oliver
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel