[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <452848B6.5060401@goop.org>
Date: Sat, 07 Oct 2006 17:39:18 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Steven Rostedt <rostedt@...dmis.org>
CC: Andrew Morton <akpm@...l.org>,
"Ananiev, Leonid I" <leonid.i.ananiev@...el.com>,
tim.c.chen@...ux.intel.com, herbert@...dor.apana.org.au,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix WARN_ON / WARN_ON_ONCE regression
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists