Both debugfs_mountpoint and tracefs_mountpoint should not be changed
externally.  Both mounpoints are returned by following interface:

  debugfs_find_mountpoint
  tracefs_find_mountpoint

Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
---
 tools/lib/api/fs/debugfs.c | 2 +-
 tools/lib/api/fs/debugfs.h | 2 --
 tools/lib/api/fs/tracefs.c | 2 +-
 tools/lib/api/fs/tracefs.h | 2 --
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
index 896c3595c9df..9e7e039a99ae 100644
--- a/tools/lib/api/fs/debugfs.c
+++ b/tools/lib/api/fs/debugfs.c
@@ -18,7 +18,7 @@
 #define DEBUGFS_DEFAULT_PATH           "/sys/kernel/debug"
 #endif
 
-char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;
+static char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;
 
 static const char * const debugfs_known_mountpoints[] = {
        DEBUGFS_DEFAULT_PATH,
diff --git a/tools/lib/api/fs/debugfs.h b/tools/lib/api/fs/debugfs.h
index 19a618e9dbc1..0eb57ecbbb5f 100644
--- a/tools/lib/api/fs/debugfs.h
+++ b/tools/lib/api/fs/debugfs.h
@@ -15,6 +15,4 @@ bool debugfs_configured(void);
 const char *debugfs_find_mountpoint(void);
 char *debugfs_mount(const char *mountpoint);
 
-extern char debugfs_mountpoint[];
-
 #endif /* __API_DEBUGFS_H__ */
diff --git a/tools/lib/api/fs/tracefs.c b/tools/lib/api/fs/tracefs.c
index e4aa9688b71e..b5d34ee3cddc 100644
--- a/tools/lib/api/fs/tracefs.c
+++ b/tools/lib/api/fs/tracefs.c
@@ -16,7 +16,7 @@
 #define TRACEFS_DEFAULT_PATH           "/sys/kernel/tracing"
 #endif
 
-char tracefs_mountpoint[PATH_MAX + 1] = TRACEFS_DEFAULT_PATH;
+static char tracefs_mountpoint[PATH_MAX + 1] = TRACEFS_DEFAULT_PATH;
 
 static const char * const tracefs_known_mountpoints[] = {
        TRACEFS_DEFAULT_PATH,
diff --git a/tools/lib/api/fs/tracefs.h b/tools/lib/api/fs/tracefs.h
index da780ac49acb..be7d4c543de5 100644
--- a/tools/lib/api/fs/tracefs.h
+++ b/tools/lib/api/fs/tracefs.h
@@ -16,6 +16,4 @@ const char *tracefs_find_mountpoint(void);
 int tracefs_valid_mountpoint(const char *debugfs);
 char *tracefs_mount(const char *mountpoint);
 
-extern char tracefs_mountpoint[];
-
 #endif /* __API_DEBUGFS_H__ */
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to