Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bb56471 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Linus Torvalds
Browse files

kernel/trace/trace_events_filter.c: use strreplace()



There's no point in starting over every time we see a ','...

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 94df2904
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -2082,7 +2082,7 @@ struct function_filter_data {
static char **
static char **
ftrace_function_filter_re(char *buf, int len, int *count)
ftrace_function_filter_re(char *buf, int len, int *count)
{
{
	char *str, *sep, **re;
	char *str, **re;


	str = kstrndup(buf, len, GFP_KERNEL);
	str = kstrndup(buf, len, GFP_KERNEL);
	if (!str)
	if (!str)
@@ -2092,8 +2092,7 @@ ftrace_function_filter_re(char *buf, int len, int *count)
	 * The argv_split function takes white space
	 * The argv_split function takes white space
	 * as a separator, so convert ',' into spaces.
	 * as a separator, so convert ',' into spaces.
	 */
	 */
	while ((sep = strchr(str, ',')))
	strreplace(str, ',', ' ');
		*sep = ' ';


	re = argv_split(GFP_KERNEL, str, count);
	re = argv_split(GFP_KERNEL, str, count);
	kfree(str);
	kfree(str);