tools lib api: The tracing_mnt variable doesn't need to be global
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 16 May 2018 19:20:12 +0000 (16:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 16 May 2018 19:20:12 +0000 (16:20 -0300)
Its only used in the file it is defined, so just make it static.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-p5x29u6mq2ml3mtnbg9844ad@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/api/fs/tracing_path.c

index 7b7fd0b1855105bac16583a19a0474d26d3c3234..4f8ec7d476b892b230ed64f92e4d8cd229169886 100644 (file)
@@ -13,8 +13,7 @@
 
 #include "tracing_path.h"
 
-
-char tracing_mnt[PATH_MAX]         = "/sys/kernel/debug";
+static char tracing_mnt[PATH_MAX]  = "/sys/kernel/debug";
 char tracing_path[PATH_MAX]        = "/sys/kernel/debug/tracing";
 char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events";
 
@@ -129,7 +128,7 @@ int tracing_path__strerror_open_tp(int err, char *buf, size_t size,
                snprintf(buf, size,
                         "Error:\tNo permissions to read %s/%s\n"
                         "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n",
-                        tracing_events_path, filename, tracing_mnt);
+                        tracing_events_path, filename, tracing_path_mount());
        }
                break;
        default: