lkml.org 
[lkml]   [2007]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Make WARN_ON/WARN_ON_ONCE no-ops when CONFIG_BUG is off
On Sat, Dec 15, 2007 at 02:34:42PM +0800, Herbert Xu wrote:
> On Sat, Dec 15, 2007 at 05:31:30PM +1100, Benjamin Herrenschmidt wrote:
> >
> > That's something I've actually never quite liked... the fact that we
> > evaluate the expression anyway. I'm pretty happy with -not- evaluating
> > the expression when CONFIG_BUG is on most of the time since whatever is
> > in there is purely here for the sake of the BUG/WARN test.
>
> Whether we evaluate the expression is a completely different debate.
> I personally agree with you that expressions that have side-effects
> are a stupid idea for either WARN_ON or BUG_ON.

As do I. But we can't really do anything about it short of auditing
them all.

--
Mathematics is the supreme nostalgia of our time.


\
 
 \ /
  Last update: 2007-12-15 19:15    [W:0.124 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site