Re: [for-next][PATCH 5/5] tracing: Use the return of str_has_prefix() to remove open coded numbers

From: Steven Rostedt
Date: Sat Dec 22 2018 - 22:51:01 EST


On Sun, 23 Dec 2018 12:23:52 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> On Sat, 22 Dec 2018 11:20:12 -0500
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
> >
> > There are several locations that compare constants to the beginning of
> > string variables to determine what commands should be done, then the
> > constant length is used to index into the string. This is error prone as the
> > hard coded numbers have to match the size of the constants. Instead, use the
> > len returned from str_has_prefix() and remove the open coded string length
> > sizes.
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
>
> for trace_probe part.

Thanks Masami!

-- Steve