All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
	Steven Rostedt <srostedt@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] ftrace: Rename set_tracer_flags()'s local variable trace_flags
Date: Sat, 8 Aug 2009 02:38:17 +0200	[thread overview]
Message-ID: <20090808003816.GL4999@nowhere> (raw)
In-Reply-To: <4A7C07A1.6070807@cn.fujitsu.com>

On Fri, Aug 07, 2009 at 06:53:21PM +0800, Zhaolei wrote:
> set_tracer_flags() have a local variable named trace_flags which have
> same name with global one.
> Actually, using tracer_flags should be better by its meaning.
> 
> Changelog:
> v1->v2: Simplied another patch in this patchset, no change in this patch.
> 
> [ Impact: cleanup ]
> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>


Queued for .32, thanks!


> ---
>  kernel/trace/trace.c |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 6344573..6c5f67f 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -2117,23 +2117,23 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
>  /* Try to assign a tracer specific option */
>  static int set_tracer_option(struct tracer *trace, char *cmp, int neg)
>  {
> -	struct tracer_flags *trace_flags = trace->flags;
> +	struct tracer_flags *tracer_flags = trace->flags;
>  	struct tracer_opt *opts = NULL;
>  	int ret = 0, i = 0;
>  	int len;
>  
> -	for (i = 0; trace_flags->opts[i].name; i++) {
> -		opts = &trace_flags->opts[i];
> +	for (i = 0; tracer_flags->opts[i].name; i++) {
> +		opts = &tracer_flags->opts[i];
>  		len = strlen(opts->name);
>  
>  		if (strncmp(cmp, opts->name, len) == 0) {
> -			ret = trace->set_flag(trace_flags->val,
> +			ret = trace->set_flag(tracer_flags->val,
>  				opts->bit, !neg);
>  			break;
>  		}
>  	}
>  	/* Not found */
> -	if (!trace_flags->opts[i].name)
> +	if (!tracer_flags->opts[i].name)
>  		return -EINVAL;
>  
>  	/* Refused to handle */
> @@ -2141,9 +2141,9 @@ static int set_tracer_option(struct tracer *trace, char *cmp, int neg)
>  		return ret;
>  
>  	if (neg)
> -		trace_flags->val &= ~opts->bit;
> +		tracer_flags->val &= ~opts->bit;
>  	else
> -		trace_flags->val |= opts->bit;
> +		tracer_flags->val |= opts->bit;
>  
>  	return 0;
>  }
> -- 
> 1.5.5.3
> 
> 


  reply	other threads:[~2009-08-08  0:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  3:26 [PATCH 1/2] ftrace: Rename set_tracer_flags()'s local variable trace_flags Zhaolei
2009-08-06  3:27 ` [PATCH 2/2] ftrace: Unify effect of writing to trace_options and option/* Zhaolei
2009-08-06  4:53   ` Frederic Weisbecker
2009-08-06  5:04   ` Li Zefan
2009-08-07  9:36     ` Zhaolei
2009-08-07 10:53     ` [PATCH v2 1/2] ftrace: Rename set_tracer_flags()'s local variable trace_flags Zhaolei
2009-08-08  0:38       ` Frederic Weisbecker [this message]
2009-08-07 10:55     ` [PATCH v2 2/2] ftrace: Unify effect of writing to trace_options and option/* Zhaolei
2009-08-08  0:39       ` Frederic Weisbecker
2009-08-06  3:50 ` [PATCH 1/2] ftrace: Rename set_tracer_flags()'s local variable trace_flags Frederic Weisbecker

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=20090808003816.GL4999@nowhere \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.com \
    --cc=zhaolei@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.