[for-next][PATCH 09/13] ftrace: Clean up ftrace_module_init() code

From: Steven Rostedt
Date: Thu Dec 24 2015 - 09:31:28 EST


From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>

The start and end variables were only used when ftrace_module_init() was
split up into multiple functions. No need to keep them around after the
merger.

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/trace/ftrace.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 29fcc2c76583..0f7ee341f89f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4982,14 +4982,11 @@ void ftrace_release_mod(struct module *mod)

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)
+ if (ftrace_disabled || !mod->num_ftrace_callsites)
return;

- ftrace_process_locs(mod, start, end);
+ ftrace_process_locs(mod, mod->ftrace_callsites,
+ mod->ftrace_callsites + mod->num_ftrace_callsites);
}

static int ftrace_module_notify_exit(struct notifier_block *self,
--
2.6.2


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/