[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150608114948.1b37a6a8@gandalf.local.home>
Date: Mon, 8 Jun 2015 11:49:48 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH 2/8] kernel/trace/trace_events_filter.c: Use
strreplace
On Thu, 4 Jun 2015 11:37:09 +0200
Rasmus Villemoes <linux@...musvillemoes.dk> wrote:
> There's no point in starting over every time we see a ','...
>
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> ---
> kernel/trace/trace_events_filter.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> index ced69da0ff55..a987601d7b43 100644
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -2075,7 +2075,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)
> @@ -2085,8 +2085,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, ',', ' ');
Acked-by: Steven Rostedt <rostedt@...dmis.org>
-- Steve
>
> re = argv_split(GFP_KERNEL, str, count);
> kfree(str);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists