Commit 7770841e authored by Zhaolei's avatar Zhaolei Committed by Frederic Weisbecker

tracing: Rename set_tracer_flags()'s local variable trace_flags

set_tracer_flags() have a local variable named trace_flags which has
the same name than a global one in the same scope.
This leads to confusion, using tracer_flags should be better by its
meaning.

Changelog:
v1->v2: Simplified another patch in this patchset, no change in this
        patch.
Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 89034bc2
...@@ -2118,23 +2118,23 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf, ...@@ -2118,23 +2118,23 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
/* Try to assign a tracer specific option */ /* Try to assign a tracer specific option */
static int set_tracer_option(struct tracer *trace, char *cmp, int neg) 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; struct tracer_opt *opts = NULL;
int ret = 0, i = 0; int ret = 0, i = 0;
int len; int len;
for (i = 0; trace_flags->opts[i].name; i++) { for (i = 0; tracer_flags->opts[i].name; i++) {
opts = &trace_flags->opts[i]; opts = &tracer_flags->opts[i];
len = strlen(opts->name); len = strlen(opts->name);
if (strncmp(cmp, opts->name, len) == 0) { if (strncmp(cmp, opts->name, len) == 0) {
ret = trace->set_flag(trace_flags->val, ret = trace->set_flag(tracer_flags->val,
opts->bit, !neg); opts->bit, !neg);
break; break;
} }
} }
/* Not found */ /* Not found */
if (!trace_flags->opts[i].name) if (!tracer_flags->opts[i].name)
return -EINVAL; return -EINVAL;
/* Refused to handle */ /* Refused to handle */
...@@ -2142,9 +2142,9 @@ static int set_tracer_option(struct tracer *trace, char *cmp, int neg) ...@@ -2142,9 +2142,9 @@ static int set_tracer_option(struct tracer *trace, char *cmp, int neg)
return ret; return ret;
if (neg) if (neg)
trace_flags->val &= ~opts->bit; tracer_flags->val &= ~opts->bit;
else else
trace_flags->val |= opts->bit; tracer_flags->val |= opts->bit;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment