[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0905030821290.7144@localhost.localdomain>
Date: Sun, 3 May 2009 08:22:01 -0400 (EDT)
From: "Robert P. J. Day" <rpjday@...shcourse.ca>
To: Pekka J Enberg <penberg@...helsinki.fi>
cc: npiggin@...e.de,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] SLQB: Use _RET_IP_ instead of
__builtin_return_address(0)
On Sun, 3 May 2009, Robert P. J. Day wrote:
> On Sun, 3 May 2009, Pekka J Enberg wrote:
>
> > From: Pekka Enberg <penberg@...helsinki.fi>
> >
> > This patch changes SLQB to use the shorter _RET_IP_ form for consistency
> > with SLUB and to prepare SQLB for eventual kmemtrace hooks.
>
> ... big snip ...
>
> > void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)
> > {
> > - return __kmem_cache_alloc(s, gfpflags, __builtin_return_address(0));
> > + return __kmem_cache_alloc(s, gfpflags, _RET_IP_);
> > }
>
> since i originally pointed out this possible simplification, i might
> as well also point out that the above is not necessarily correct. in
> include/linux/kernel.h:
>
> #define _RET_IP_ (unsigned long)__builtin_return_address(0)
>
> as in, _RET_IP_ represents the **(unsigned long)** cast of that
> (void*) value. so, technically, that's not merely an aesthetic
> replacement. is that still what you wanted?
whoops, never mind, i didn't read far enough to notice you were
making that change throughout the code. carry on.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
Linked In: http://www.linkedin.com/in/rpjday
Twitter: http://twitter.com/rpjday
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists