Steven Rostedt wrote:
http://marc.theaimsgroup.com/?l=linux-kernel&m=114935833125957&w=2
That was different, since we were putting a likely condition in an
unlikely(). But I still don't see why we would ever want to test
__warn_once before the condition, since it doesn't save on anything and
just adds extra work. I don't see the savings.
Also, in that thread you cite (__warn_once && (condition)) is flat-out
wrong, because condition may have a side-effect. There are plenty of
places in the code which use BUG_ON or WARN_ON as a general error
checking mechanism which expect the condition to be always evaluated
once; WARN_ON_ONCE should be the same.
Personally I think it is poor style, but there you are.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]