tracing: Make tracing_snapshot_instance_cond() static
PATCH 1/1 tracing: Make tracing_snapshot_instance_cond() static
Fix the following sparse warning:
kernel/trace/trace.c:950:6: warning: symbol 'tracing_snapshot_instance_cond' was not declared. Should it be static?
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zou Wei <[email protected]>
--- kernel/trace/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/trace.c +2 -1
@@ -947,7 +947,8 @@ int __trace_bputs(unsigned long ip, const char *str)EXPORT_SYMBOL_GPL (__trace_bputs);#ifdef CONFIG_TRACER_SNAPSHOT -void tracing_snapshot_instance_cond (struct trace_array *tr,void *cond_data) +static void tracing_snapshot_instance_cond (struct trace_array *tr, +void *cond_data) {struct tracer *tracer = tr->current_trace;unsigned long flags;
Signature · 1 line
2.6.2
Steven Rostedt
maintainerQuoted 4 lines · On Thu, 23 Apr 2020 12:08:25 +0800 Zou Wei <[email protected]> wrote:
Fix the following sparse warning:
kernel/trace/trace.c:950:6: warning: symbol 'tracing_snapshot_instance_cond' was not declared. Should it be static?
Thanks, I'll add it to my queue.
-- Steve
Quoted 21 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Zou Wei <[email protected]>--- kernel/trace/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)kernel/trace/trace.c +2
-1@@ -947,7 +947,8 @@ int __trace_bputs(unsigned long ip, const char *str)EXPORT_SYMBOL_GPL (__trace_bputs);#ifdef CONFIG_TRACER_SNAPSHOT -void tracing_snapshot_instance_cond (struct trace_array *tr,void *cond_data) +static void tracing_snapshot_instance_cond (struct trace_array *tr, +void *cond_data) {struct tracer *tracer = tr->current_trace;unsigned long flags;