lkml.org 
[lkml]   [2007]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Make WARN_ON/WARN_ON_ONCE no-ops when CONFIG_BUG is off
From
Date

On Fri, 2007-12-14 at 12:02 -0600, Matt Mackall wrote:
>
> I added CONFIG_BUG, and I think the current behavior is correct. As
> you've noticed, we have to evaluate condition, it may have
> side-effects. And if code does:
>
> /* this indicates a driver bug, report and fail gracefully */
> if (WARN_ON(val == NULL))
> return -EFAULT;
>
> ..we surely want it to continue returning -EFAULT, regardless of
> whether we log it, no? What use case did you have in mind?

I find such code totally distateful.

Ben.



\
 
 \ /
  Last update: 2007-12-15 07:25    [from the cache]
©2003-2011 Jasper Spaans