cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] gfs2: Use CALLER_ADDR0 macro.
Date: Mon, 21 Dec 2009 09:22:41 +0000	[thread overview]
Message-ID: <1261387361.2200.6.camel@localhost> (raw)
In-Reply-To: <1261332469-25298-2-git-send-email-tfransosi@gmail.com>

Hi,

Looks fairly harmless, even though I don't entirely see the point. Do
you want me to add this to me tree?

Acked-by: Steven Whitehouse <swhiteho@redhat.com>

Steve.

On Sun, 2009-12-20 at 13:07 -0500, Thiago Farina wrote:
> 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 <tfransosi@gmail.com>
> ---
>  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 <linux/freezer.h>
>  #include <linux/workqueue.h>
>  #include <linux/jiffies.h>
> +#include <linux/ftrace.h>
>  
>  #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 <linux/gfs2_ondisk.h>
>  #include <linux/bio.h>
>  #include <linux/posix_acl.h>
> +#include <linux/ftrace.h>
>  
>  #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 <linux/buffer_head.h>
>  #include <linux/kallsyms.h>
>  #include <linux/gfs2_ondisk.h>
> +#include <linux/ftrace.h>
>  
>  #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;




       reply	other threads:[~2009-12-21  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1261332469-25298-1-git-send-email-tfransosi@gmail.com>
     [not found] ` <1261332469-25298-2-git-send-email-tfransosi@gmail.com>
2009-12-21  9:22   ` Steven Whitehouse [this message]
2009-12-21 13:43     ` [Cluster-devel] [PATCH 2/2] gfs2: Use CALLER_ADDR0 macro Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1261387361.2200.6.camel@localhost \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).