summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/fs.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-11-05 14:48:50 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-05 15:15:00 -0300
commitcf38fadade52df937521dd70d4437df1a9354cd9 (patch)
treee40d0b9b949de86c395bd189b9810790b28edc69 /tools/perf/util/fs.c
parent4299a549979783668d787959d61ba22b6b200877 (diff)
downloadlinux-cf38fadade52df937521dd70d4437df1a9354cd9.tar.gz
linux-cf38fadade52df937521dd70d4437df1a9354cd9.tar.xz
perf fs: Rename NAME_find_mountpoint() to NAME__mountpoint()
Shorten it, "finding" it is an implementation detail, what callers want is the pathname, not to ask for it to _always_ do the lookup. And the existing implementation already caches it, i.e. it doesn't "finds" it on every call. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-r24wa4bvtccg7mnkessrbbdj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/fs.c')
-rw-r--r--tools/perf/util/fs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/fs.c b/tools/perf/util/fs.c
index a2413e842a02..77bac4e4c115 100644
--- a/tools/perf/util/fs.c
+++ b/tools/perf/util/fs.c
@@ -88,7 +88,7 @@ static const char *fs__get_mountpoint(struct fs *fs)
return fs__read_mounts(fs) ? fs->path : NULL;
}
-static const char *fs__find_mountpoint(int idx)
+static const char *fs__mountpoint(int idx)
{
struct fs *fs = &fs__entries[idx];
@@ -98,10 +98,10 @@ static const char *fs__find_mountpoint(int idx)
return fs__get_mountpoint(fs);
}
-#define FIND_MOUNTPOINT(name, idx) \
-const char *name##_find_mountpoint(void) \
-{ \
- return fs__find_mountpoint(idx); \
+#define FS__MOUNTPOINT(name, idx) \
+const char *name##__mountpoint(void) \
+{ \
+ return fs__mountpoint(idx); \
}
-FIND_MOUNTPOINT(sysfs, FS__SYSFS);
+FS__MOUNTPOINT(sysfs, FS__SYSFS);