Messages in this thread | | | From | Duncan Sands <> | Subject | Re: [linux-usb-devel] [PATCH 7/9] USB usbfs: destroy submitted urbs only on the disconnected interface | Date | Thu, 15 Apr 2004 10:47:48 +0200 |
| |
> > 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.
> 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.
All the best,
Duncan. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |