mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ftrace: Join functions ftrace_module_init and ftrace_init_module
@ 2015-12-02 14:39 Abel Vesa
  2015-12-23 16:32 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Abel Vesa @ 2015-12-02 14:39 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel, Abel Vesa

Simple cleanup. No need for two functions here.
The whole work can simply be done inside 'ftrace_module_init'.

Signed-off-by: Abel Vesa <abelvesa@linux.com>
---
 kernel/trace/ftrace.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index e371aed..f558195 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5008,19 +5008,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,
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ftrace: Join functions ftrace_module_init and ftrace_init_module
  2015-12-02 14:39 [PATCH] ftrace: Join functions ftrace_module_init and ftrace_init_module Abel Vesa
@ 2015-12-23 16:32 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2015-12-23 16:32 UTC (permalink / raw)
  To: Abel Vesa; +Cc: linux-kernel

On Wed,  2 Dec 2015 15:39:57 +0100
Abel Vesa <abelvesa@linux.com> wrote:

> Simple cleanup. No need for two functions here.
> The whole work can simply be done inside 'ftrace_module_init'.

Thanks! Applied.

-- Steve


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-23 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-02 14:39 [PATCH] ftrace: Join functions ftrace_module_init and ftrace_init_module Abel Vesa
2015-12-23 16:32 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome