From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756301AbZECMVE (ORCPT ); Sun, 3 May 2009 08:21:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755557AbZECMUx (ORCPT ); Sun, 3 May 2009 08:20:53 -0400 Received: from astoria.ccjclearline.com ([64.235.106.9]:51360 "EHLO astoria.ccjclearline.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754159AbZECMUx (ORCPT ); Sun, 3 May 2009 08:20:53 -0400 Date: Sun, 3 May 2009 08:19:39 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: Pekka J Enberg cc: npiggin@suse.de, Linux Kernel Mailing List Subject: Re: [PATCH] SLQB: Use _RET_IP_ instead of __builtin_return_address(0) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - astoria.ccjclearline.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 3 May 2009, Pekka J Enberg wrote: > From: Pekka Enberg > > 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? 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 ========================================================================