]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Embed replace_filter_string() helper function
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 23 Feb 2018 14:45:27 +0000 (09:45 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 10 Mar 2018 21:06:07 +0000 (16:06 -0500)
commit2ed50ce6d66f6eed123da49e6f3955b5754b0755
treee72d5197552f85dacc92b0f9de917abe3679904a
parent773414d59ba6924def3210027b4a9eb3efada9ae
tracing: Embed replace_filter_string() helper function

The replace_filter_string() frees the current string and then copies a given
string. But in the two locations that it was used, the allocation happened
right after the filter was allocated (nothing to replace). There's no need
for this to be a helper function. Embedding the allocation in the two places
where it was called will make changing the code in the future easier.

Also make the variable consistent (always use "filter_string" as the name,
as it was used in one instance as "filter_str")

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c