提交 3a36cb11 编写于 作者: J Jiri Slaby 提交者: Steven Rostedt

ftrace: Do not pass data to ftrace_dyn_arch_init

As the data parameter is not really used by any ftrace_dyn_arch_init,
remove that from ftrace_dyn_arch_init. This also removes the addr
local variable from ftrace_init which is now unused.

Note the documentation was imprecise as it did not suggest to set
(*data) to 0.

Link: http://lkml.kernel.org/r/1393268401-24379-4-git-send-email-jslaby@suse.cz

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Signed-off-by: NJiri Slaby <jslaby@suse.cz>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 af64a7cb
...@@ -358,7 +358,7 @@ Every arch has an init callback function. If you need to do something early on ...@@ -358,7 +358,7 @@ Every arch has an init callback function. If you need to do something early on
to initialize some state, this is the time to do that. Otherwise, this simple to initialize some state, this is the time to do that. Otherwise, this simple
function below should be sufficient for most people: function below should be sufficient for most people:
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -156,7 +156,7 @@ int ftrace_make_nop(struct module *mod, ...@@ -156,7 +156,7 @@ int ftrace_make_nop(struct module *mod,
return ret; return ret;
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -65,7 +65,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -65,7 +65,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return ftrace_modify_code(ip, call, sizeof(call)); return ftrace_modify_code(ip, call, sizeof(call));
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -198,7 +198,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -198,7 +198,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
} }
/* run from kstop_machine */ /* run from kstop_machine */
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
...@@ -117,7 +117,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -117,7 +117,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
} }
/* run from kstop_machine */ /* run from kstop_machine */
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
...@@ -171,7 +171,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -171,7 +171,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return ret; return ret;
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -198,7 +198,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -198,7 +198,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return ftrace_modify_code(FTRACE_CALL_IP, new); return ftrace_modify_code(FTRACE_CALL_IP, new);
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
/* Encode the instructions when booting */ /* Encode the instructions when booting */
ftrace_dyn_arch_init_insns(); ftrace_dyn_arch_init_insns();
......
...@@ -531,7 +531,7 @@ void arch_ftrace_update_code(int command) ...@@ -531,7 +531,7 @@ void arch_ftrace_update_code(int command)
ftrace_disable_ftrace_graph_caller(); ftrace_disable_ftrace_graph_caller();
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -130,7 +130,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -130,7 +130,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return 0; return 0;
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -272,7 +272,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -272,7 +272,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return ftrace_modify_code(rec->ip, old, new); return ftrace_modify_code(rec->ip, old, new);
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -82,7 +82,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -82,7 +82,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return ftrace_modify_code(ip, old, new); return ftrace_modify_code(ip, old, new);
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -167,7 +167,7 @@ int ftrace_make_nop(struct module *mod, ...@@ -167,7 +167,7 @@ int ftrace_make_nop(struct module *mod,
return ret; return ret;
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -668,7 +668,7 @@ void arch_ftrace_update_code(int command) ...@@ -668,7 +668,7 @@ void arch_ftrace_update_code(int command)
atomic_dec(&modifying_ftrace_code); atomic_dec(&modifying_ftrace_code);
} }
int __init ftrace_dyn_arch_init(void *data) int __init ftrace_dyn_arch_init(void)
{ {
return 0; return 0;
} }
......
...@@ -423,7 +423,7 @@ ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable); ...@@ -423,7 +423,7 @@ ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable);
/* defined in arch */ /* defined in arch */
extern int ftrace_ip_converted(unsigned long ip); extern int ftrace_ip_converted(unsigned long ip);
extern int ftrace_dyn_arch_init(void *data); extern int ftrace_dyn_arch_init(void);
extern void ftrace_replace_code(int enable); extern void ftrace_replace_code(int enable);
extern int ftrace_update_ftrace_func(ftrace_func_t func); extern int ftrace_update_ftrace_func(ftrace_func_t func);
extern void ftrace_caller(void); extern void ftrace_caller(void);
......
...@@ -4372,14 +4372,11 @@ void __init ftrace_init(void) ...@@ -4372,14 +4372,11 @@ void __init ftrace_init(void)
{ {
extern unsigned long __start_mcount_loc[]; extern unsigned long __start_mcount_loc[];
extern unsigned long __stop_mcount_loc[]; extern unsigned long __stop_mcount_loc[];
unsigned long count, addr, flags; unsigned long count, flags;
int ret; int ret;
/* Keep the ftrace pointer to the stub */
addr = (unsigned long)ftrace_stub;
local_irq_save(flags); local_irq_save(flags);
ret = ftrace_dyn_arch_init(&addr); ret = ftrace_dyn_arch_init();
local_irq_restore(flags); local_irq_restore(flags);
if (ret) if (ret)
goto failed; goto failed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册