Messages in this thread | | | Date | Sat, 22 Dec 2018 22:46:31 -0500 | From | Steven Rostedt <> | Subject | Re: [for-next][PATCH 5/5] tracing: Use the return of str_has_prefix() to remove open coded numbers |
| |
On Sun, 23 Dec 2018 12:23:52 +0900 Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Sat, 22 Dec 2018 11:20:12 -0500 > Steven Rostedt <rostedt@goodmis.org> wrote: > > > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org> > > > > 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@kernel.org> > > for trace_probe part.
Thanks Masami!
-- Steve
| |