Fix sparse warnings:
kernel/trace/trace.c:6927:24: warning:
symbol 'get_tracing_log_err' was not declared. Should it be static?
kernel/trace/trace.c:8196:15: warning:
symbol 'trace_instance_dir' was not declared. Should it be static?
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
kernel/trace/trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a092e40..650b141 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6924,7 +6924,7 @@ struct tracing_log_err {
static DEFINE_MUTEX(tracing_err_log_lock);
-struct tracing_log_err *get_tracing_log_err(struct trace_array *tr)
+static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr)
{
struct tracing_log_err *err;
@@ -8193,7 +8193,7 @@ static const struct file_operations buffer_percent_fops = {
.llseek = default_llseek,
};
-struct dentry *trace_instance_dir;
+static struct dentry *trace_instance_dir;
static void
init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer);
--
2.7.4
Hi YueHaibing,
On 6/14/2019 10:32 AM, YueHaibing wrote:
> Fix sparse warnings:
>
> kernel/trace/trace.c:6927:24: warning:
> symbol 'get_tracing_log_err' was not declared. Should it be static?
> kernel/trace/trace.c:8196:15: warning:
> symbol 'trace_instance_dir' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
These look fine to me.
Acked-by: Tom Zanussi <[email protected]>
Thanks,
Tom
> ---
> kernel/trace/trace.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index a092e40..650b141 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6924,7 +6924,7 @@ struct tracing_log_err {
>
> static DEFINE_MUTEX(tracing_err_log_lock);
>
> -struct tracing_log_err *get_tracing_log_err(struct trace_array *tr)
> +static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr)
> {
> struct tracing_log_err *err;
>
> @@ -8193,7 +8193,7 @@ static const struct file_operations buffer_percent_fops = {
> .llseek = default_llseek,
> };
>
> -struct dentry *trace_instance_dir;
> +static struct dentry *trace_instance_dir;
>
> static void
> init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer);