Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755976AbZLTSI3 (ORCPT ); Sun, 20 Dec 2009 13:08:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755975AbZLTSIZ (ORCPT ); Sun, 20 Dec 2009 13:08:25 -0500 Received: from qw-out-2122.google.com ([74.125.92.26]:47473 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755916AbZLTSIX (ORCPT ); Sun, 20 Dec 2009 13:08:23 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=t1c7NPeClf/lvSKCLHdwgo6TeJZ3CktsaG7kknvLFZHlsJ+Tby0LDe9XTjcIdxLiXB lrG+C7GJYbbJloxy0JG3lcOl8/Q77gX0hLh6g+UKIFKEFHkhX/jFXnvDypzJCXL9VFsa Re3ZSMhUIE5SstEJzUBF4cAYkyFjsz09XgzjY= From: Thiago Farina To: linux-kernel@vger.kernel.org Cc: Steven Whitehouse , Benjamin Marzinski , David Teigland , Thiago Farina , cluster-devel@redhat.com Subject: [PATCH 2/2] gfs2: Use CALLER_ADDR0 macro. Date: Sun, 20 Dec 2009 13:07:47 -0500 Message-Id: <1261332469-25298-2-git-send-email-tfransosi@gmail.com> X-Mailer: git-send-email 1.6.6.rc3 In-Reply-To: <1261332469-25298-1-git-send-email-tfransosi@gmail.com> References: <1261332469-25298-1-git-send-email-tfransosi@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2852 Lines: 93 Use CALLER_ADDR0 instead of (unsigned long)__builtin_return_address(0), since this macro was created for this. This patch was generated by: sed -i "s/(unsigned long)__builtin_return_address(0)/CALLER_ADDR0/g" path/to/file Signed-off-by: Thiago Farina --- fs/gfs2/glock.c | 5 +++-- fs/gfs2/glops.c | 3 ++- fs/gfs2/trans.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f455a03..216898d 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -831,7 +832,7 @@ void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, { INIT_LIST_HEAD(&gh->gh_list); gh->gh_gl = gl; - gh->gh_ip = (unsigned long)__builtin_return_address(0); + gh->gh_ip = CALLER_ADDR0; gh->gh_owner_pid = get_pid(task_pid(current)); gh->gh_state = state; gh->gh_flags = flags; @@ -855,7 +856,7 @@ void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder * gh->gh_state = state; gh->gh_flags = flags; gh->gh_iflags = 0; - gh->gh_ip = (unsigned long)__builtin_return_address(0); + gh->gh_ip = CALLER_ADDR0; } /** diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 78554ac..b8331d8 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -51,7 +52,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl) /* A shortened, inline version of gfs2_trans_begin() */ tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes, sizeof(u64)); - tr.tr_ip = (unsigned long)__builtin_return_address(0); + tr.tr_ip = CALLER_ADDR0; INIT_LIST_HEAD(&tr.tr_list_buf); gfs2_log_reserve(sdp, tr.tr_reserved); BUG_ON(current->journal_info); diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 4ef0e9f..9355c73 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -40,7 +41,7 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, if (!tr) return -ENOMEM; - tr->tr_ip = (unsigned long)__builtin_return_address(0); + tr->tr_ip = CALLER_ADDR0; tr->tr_blocks = blocks; tr->tr_revokes = revokes; tr->tr_reserved = 1; -- 1.6.6.rc0.61.g41d5b -- 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/