diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2009-08-07 06:53:21 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-11 14:35:25 -0400 |
commit | 7770841e63730d62928b0879498064e9614b2ce0 (patch) | |
tree | 6bc12618ec2cdbc6e5294e6b967652eaf7c3c9d6 /kernel/trace/trace.c | |
parent | 89034bc2c7b839702c00a704e79d112737f98be0 (diff) |
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: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | 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 e793cda91dd3..8ac204360a39 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2118,23 +2118,23 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf, | |||
2118 | /* Try to assign a tracer specific option */ | 2118 | /* Try to assign a tracer specific option */ |
2119 | static int set_tracer_option(struct tracer *trace, char *cmp, int neg) | 2119 | static int set_tracer_option(struct tracer *trace, char *cmp, int neg) |
2120 | { | 2120 | { |
2121 | struct tracer_flags *trace_flags = trace->flags; | 2121 | struct tracer_flags *tracer_flags = trace->flags; |
2122 | struct tracer_opt *opts = NULL; | 2122 | struct tracer_opt *opts = NULL; |
2123 | int ret = 0, i = 0; | 2123 | int ret = 0, i = 0; |
2124 | int len; | 2124 | int len; |
2125 | 2125 | ||
2126 | for (i = 0; trace_flags->opts[i].name; i++) { | 2126 | for (i = 0; tracer_flags->opts[i].name; i++) { |
2127 | opts = &trace_flags->opts[i]; | 2127 | opts = &tracer_flags->opts[i]; |
2128 | len = strlen(opts->name); | 2128 | len = strlen(opts->name); |
2129 | 2129 | ||
2130 | if (strncmp(cmp, opts->name, len) == 0) { | 2130 | if (strncmp(cmp, opts->name, len) == 0) { |
2131 | ret = trace->set_flag(trace_flags->val, | 2131 | ret = trace->set_flag(tracer_flags->val, |
2132 | opts->bit, !neg); | 2132 | opts->bit, !neg); |
2133 | break; | 2133 | break; |
2134 | } | 2134 | } |
2135 | } | 2135 | } |
2136 | /* Not found */ | 2136 | /* Not found */ |
2137 | if (!trace_flags->opts[i].name) | 2137 | if (!tracer_flags->opts[i].name) |
2138 | return -EINVAL; | 2138 | return -EINVAL; |
2139 | 2139 | ||
2140 | /* Refused to handle */ | 2140 | /* Refused to handle */ |
@@ -2142,9 +2142,9 @@ static int set_tracer_option(struct tracer *trace, char *cmp, int neg) | |||
2142 | return ret; | 2142 | return ret; |
2143 | 2143 | ||
2144 | if (neg) | 2144 | if (neg) |
2145 | trace_flags->val &= ~opts->bit; | 2145 | tracer_flags->val &= ~opts->bit; |
2146 | else | 2146 | else |
2147 | trace_flags->val |= opts->bit; | 2147 | tracer_flags->val |= opts->bit; |
2148 | 2148 | ||
2149 | return 0; | 2149 | return 0; |
2150 | } | 2150 | } |