Skip to content

Commit

Permalink
ftrace: Join functions ftrace_module_init() and ftrace_init_module()
Browse files Browse the repository at this point in the history
Simple cleanup. No need for two functions here.
The whole work can simply be done inside 'ftrace_module_init'.

Link: http://lkml.kernel.org/r/1449067197-5718-1-git-send-email-abelvesa@linux.com

Signed-off-by: Abel Vesa <abelvesa@linux.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Abel Vesa authored and Steven Rostedt committed Dec 23, 2015
1 parent 2701121 commit b6b71f6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -4980,19 +4980,16 @@ void ftrace_release_mod(struct module *mod)
mutex_unlock(&ftrace_lock);
}

static void ftrace_init_module(struct module *mod,
unsigned long *start, unsigned long *end)
void ftrace_module_init(struct module *mod)
{
unsigned long *start = mod->ftrace_callsites;
unsigned long *end = mod->ftrace_callsites +
mod->num_ftrace_callsites;

if (ftrace_disabled || start == end)
return;
ftrace_process_locs(mod, start, end);
}

void ftrace_module_init(struct module *mod)
{
ftrace_init_module(mod, mod->ftrace_callsites,
mod->ftrace_callsites +
mod->num_ftrace_callsites);
ftrace_process_locs(mod, start, end);
}

static int ftrace_module_notify_exit(struct notifier_block *self,
Expand Down

0 comments on commit b6b71f6

Please sign in to comment.