Re: [PATCH -next] tracing: Make tracing_snapshot_instance_cond() static

From: Steven Rostedt
Date: Fri Apr 24 2020 - 09:48:26 EST


On Thu, 23 Apr 2020 12:08:25 +0800
Zou Wei <zou_wei@xxxxxxxxxx> 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

>
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Zou Wei <zou_wei@xxxxxxxxxx>
> ---
> kernel/trace/trace.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 8d2b988..1424a89 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -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;