From: Steven Rostedt (Red Hat) Date: Mon, 28 Sep 2015 13:41:11 +0000 (-0400) Subject: tracing: Make ftrace_trace_stack() static X-Git-Tag: firefly_0821_release~176^2~700^2~65 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca475e831fd59e131bccd60de43c4104d82d02f5;p=firefly-linux-kernel-4.4.55.git tracing: Make ftrace_trace_stack() static ftrace_trace_stack() is not called outside of trace.c. Make it a static function. Signed-off-by: Steven Rostedt --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 3329c8efb34f..5d3ce2900d64 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -472,12 +472,20 @@ static inline void trace_access_lock_init(void) static void __ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, int skip, int pc, struct pt_regs *regs); +static void ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, + int skip, int pc); + #else static inline void __ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, int skip, int pc, struct pt_regs *regs) { } +static inline void ftrace_trace_stack(struct ring_buffer *buffer, + unsigned long flags, int skip, int pc) +{ +} + #endif /* trace_flags holds trace_options default values */ @@ -1872,7 +1880,7 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer, } -void ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, +static void ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, int skip, int pc) { if (!(trace_flags & TRACE_ITER_STACKTRACE)) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 3b2a950a6291..107cf081ac27 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -611,20 +611,12 @@ void update_max_tr_single(struct trace_array *tr, #endif /* CONFIG_TRACER_MAX_TRACE */ #ifdef CONFIG_STACKTRACE -void ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, - int skip, int pc); - void ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc); void __trace_stack(struct trace_array *tr, unsigned long flags, int skip, int pc); #else -static inline void ftrace_trace_stack(struct ring_buffer *buffer, - unsigned long flags, int skip, int pc) -{ -} - static inline void ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc) {