Re: [PATCH 24/46] kernel: Mark function as static in kernel/trace/ftrace.c and remove stub declaration from header file include/linux/ftrace.h

Steven Rostedt
2014-02-27T16:39:32Z

On Thu, 27 Feb 2014 17:31:21 +0530
Rashika Kheria <rashika.kheria@gmail.com> wrote:

> Mark function as static in kernel/trace/ftrace.c because it is not used
> outside this file.
> Also, remove unused stub declaration from header file
> include/linux/ftrace.h.
>
> This eliminates the following warning in kernel/trace/ftrace.c:
> kernel/trace/ftrace.c:4268:6: warning: no previous prototype for ‘ftrace_release_mod’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

> ---
> include/linux/ftrace.h | 1 -
> kernel/trace/ftrace.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index f4233b1..68ea184 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -532,7 +532,6 @@ static inline int skip_trace(unsigned long ip) { return 0; }
> static inline int ftrace_force_update(void) { return 0; }
> static inline void ftrace_disable_daemon(void) { }
> static inline void ftrace_enable_daemon(void) { }
> -static inline void ftrace_release_mod(struct module *mod) {}
> static inline __init int register_ftrace_command(struct ftrace_func_command *cmd)
> {
> return -EINVAL;
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index d110d8a..9bacf45 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -4265,7 +4265,7 @@ static int ftrace_process_locs(struct module *mod,
>
> #define next_to_ftrace_page(p) container_of(p, struct ftrace_page, next)
>
> -void ftrace_release_mod(struct module *mod)
> +static void ftrace_release_mod(struct module *mod)
> {
> struct dyn_ftrace *rec;
> struct ftrace_page **last_pg;