summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-02-22 23:17:54 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-03-10 16:06:06 -0500
commitc7399708b3cd9004205923c3d139dcc7d067a8a4 (patch)
tree3711bba8b801c62177c59c8c984f8cba485e7ea4 /kernel/trace
parent559d421267d1594c541143489d9ee9a869dc6093 (diff)
downloadlinux-c7399708b3cd9004205923c3d139dcc7d067a8a4.tar.bz2
tracing: Remove filter allocator helper
The __alloc_filter() function does nothing more that allocate the filter. There's no reason to have it as a helper function. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_filter.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index f42442cd423a..3d60bbeb2ef1 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -866,14 +866,6 @@ void free_event_filter(struct event_filter *filter)
__free_filter(filter);
}
-static struct event_filter *__alloc_filter(void)
-{
- struct event_filter *filter;
-
- filter = kzalloc(sizeof(*filter), GFP_KERNEL);
- return filter;
-}
-
static int __alloc_preds(struct event_filter *filter, int n_preds)
{
struct filter_pred *pred;
@@ -1812,7 +1804,7 @@ static int replace_system_preds(struct trace_subsystem_dir *dir,
list_add_tail(&filter_item->list, &filter_list);
- filter_item->filter = __alloc_filter();
+ filter_item->filter = kzalloc(sizeof(*filter), GFP_KERNEL);
if (!filter_item->filter)
goto fail_mem;
filter = filter_item->filter;
@@ -1886,7 +1878,7 @@ static int create_filter_start(char *filter_str, bool set_str,
WARN_ON_ONCE(*psp || *filterp);
/* allocate everything, and if any fails, free all and fail */
- filter = __alloc_filter();
+ filter = kzalloc(sizeof(*filter), GFP_KERNEL);
if (filter && set_str)
err = replace_filter_string(filter, filter_str);