lkml.org 
[lkml]   [2005]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: -mm -> 2.6.13 merge status
On Thu, Jun 23 2005, Andrew Morton wrote:
> Jeff Mahoney <jeffm@suse.de> wrote:
> >
> > >>+ assert("nikita-955", pool != NULL);
> > >
> > > These assertion codes are meaningless to the rest of us so please drop
> > > them.
> >
> > As someone who spends time debugging reiser3 issues, I've grown
> > accustomed to the named assertions. They make discussing a particular
> > assertion much more natural in conversation than file:line.
>
> __FUNCTION__?

Doesn't help a lot. I've also been annoyed several times in the past
when having to lookup a BUG() for a kernel source I don't exactly have
at hand right then and there. If you have constructs ala

function()
{
if (cond_a)
BUG();
if (cond_b)
BUG();
if (cond_c)
BUG();

do_stuff...
}

then it's impossible to know which one it is without the identical
source at hand.

That said, I don't like the reiser name-number style. If you must do
something like this, mark responsibility by using a named identifier
covering the layer in question instead.

assert("trace_hash-89", is_hashed(foo) != 0);

or whatever.

--
Jens Axboe

-
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: 2005-06-23 22:10    [W:0.497 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site