diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-06-25 15:02:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 17:00:40 -0700 |
commit | 1bb564718f298dfd7c435819d3bc902e6be666c6 (patch) | |
tree | b93ace76c5c94e69ce42af861ddda2c3b37a6145 /kernel/trace | |
parent | 94df290404cd0da8016698bf3f398410f29d9a64 (diff) | |
download | linux-1bb564718f298dfd7c435819d3bc902e6be666c6.tar.bz2 |
kernel/trace/trace_events_filter.c: use strreplace()
There's no point in starting over every time we see a ','...
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 7f2e97ce71a7..9d4a78f45dc4 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -2082,7 +2082,7 @@ struct function_filter_data { static char ** ftrace_function_filter_re(char *buf, int len, int *count) { - char *str, *sep, **re; + char *str, **re; str = kstrndup(buf, len, GFP_KERNEL); if (!str) @@ -2092,8 +2092,7 @@ ftrace_function_filter_re(char *buf, int len, int *count) * The argv_split function takes white space * as a separator, so convert ',' into spaces. */ - while ((sep = strchr(str, ','))) - *sep = ' '; + strreplace(str, ',', ' '); re = argv_split(GFP_KERNEL, str, count); kfree(str); |