lkml.org 
[lkml]   [2006]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] let WARN_ON() output the condition

* Jiri Kosina <jikos@jikos.cz> wrote:

> > but i agree with you in theory that your proposed output is better, but
> > the side-effect issue is a killer i think. Could you try to rework it to
> > not evaluate the condition twice and to make it dependent on
> > CONFIG_DEBUG_BUGVERBOSE? You can avoid the evaluation side-effect issue
> > by doing something like:
> > int __c = (c); \
> > \
> > if (unlikely(__c)) { \
> > if (debug_locks_off()) \
> > WARN_ON(__c); \
> > __ret = 1; \
> >
>
> Yep, making it dependent on CONFIG_DEBUG_BUGVERBOSE makes sense.
> Andrew, will you take such patch? (when I also fix the
> evaluating-twice issue).

i'll probably ack such a patch, it can be useful even when the line
number is unique: if someone reports a WARN_ON() from an old kernel i
dont have to dig up the exact source but can see it right from the
condition what happened. Useful redundancy in bug output can be quite
useful at times. Please post it and we'll see whether it's acceptable.

Ingo
-
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/

\
 
 \ /
  Last update: 2006-12-06 10:11    [W:0.221 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site