lkml.org 
[lkml]   [2008]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/3] move WARN_ON() out of line
Ingo Molnar wrote:
> * Arjan van de Ven <arjan@linux.intel.com> wrote:
>
>
>> +#define WARN_ON(condition) do_warn_on((unsigned long)(condition), __FILE__, \
>> + __LINE__, __FUNCTION__)
>>
>
> hm. This passes in 4 arguments to do_warn_on().
>
> i think we could get away with no arguments (!), by using section
> tricks. Firstly, we can get rid of __FUNCTION__ and replace it with a
> ksyms lookup - that is fine enough. Secondly, we could put __FILE__ and
> __LINE__ into a text section and key it up to the return address from
> do_warn_on().
>

BUG_ON already does this, and WARN_ON can reuse all the same machinery.

J


\
 
 \ /
  Last update: 2008-01-05 07:45    [W:0.133 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site