diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-07-04 09:20:25 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-07-12 12:52:52 -0400 |
commit | b6b96fb48f75d62858b39baf13c83c4504642f15 (patch) | |
tree | ade28c743d531461263e30c746a9068b2acf6223 /tools/perf/util/pmu.c | |
parent | a609bda78203a21fb0e78b9d5b4ab911678e4ebb (diff) |
perf tools: Add const specifier to perf_pmu__find name parameter
The name parameter is constant, declare it so.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1372944040-32690-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.c')
-rw-r--r-- | tools/perf/util/pmu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 4c6f9c490a8d..1d1862dcbbbc 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c | |||
@@ -73,7 +73,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head) | |||
73 | * located at: | 73 | * located at: |
74 | * /sys/bus/event_source/devices/<dev>/format as sysfs group attributes. | 74 | * /sys/bus/event_source/devices/<dev>/format as sysfs group attributes. |
75 | */ | 75 | */ |
76 | static int pmu_format(char *name, struct list_head *format) | 76 | static int pmu_format(const char *name, struct list_head *format) |
77 | { | 77 | { |
78 | struct stat st; | 78 | struct stat st; |
79 | char path[PATH_MAX]; | 79 | char path[PATH_MAX]; |
@@ -162,7 +162,7 @@ static int pmu_aliases_parse(char *dir, struct list_head *head) | |||
162 | * Reading the pmu event aliases definition, which should be located at: | 162 | * Reading the pmu event aliases definition, which should be located at: |
163 | * /sys/bus/event_source/devices/<dev>/events as sysfs group attributes. | 163 | * /sys/bus/event_source/devices/<dev>/events as sysfs group attributes. |
164 | */ | 164 | */ |
165 | static int pmu_aliases(char *name, struct list_head *head) | 165 | static int pmu_aliases(const char *name, struct list_head *head) |
166 | { | 166 | { |
167 | struct stat st; | 167 | struct stat st; |
168 | char path[PATH_MAX]; | 168 | char path[PATH_MAX]; |
@@ -208,7 +208,7 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias, | |||
208 | * located at: | 208 | * located at: |
209 | * /sys/bus/event_source/devices/<dev>/type as sysfs attribute. | 209 | * /sys/bus/event_source/devices/<dev>/type as sysfs attribute. |
210 | */ | 210 | */ |
211 | static int pmu_type(char *name, __u32 *type) | 211 | static int pmu_type(const char *name, __u32 *type) |
212 | { | 212 | { |
213 | struct stat st; | 213 | struct stat st; |
214 | char path[PATH_MAX]; | 214 | char path[PATH_MAX]; |
@@ -266,7 +266,7 @@ static void pmu_read_sysfs(void) | |||
266 | closedir(dir); | 266 | closedir(dir); |
267 | } | 267 | } |
268 | 268 | ||
269 | static struct cpu_map *pmu_cpumask(char *name) | 269 | static struct cpu_map *pmu_cpumask(const char *name) |
270 | { | 270 | { |
271 | struct stat st; | 271 | struct stat st; |
272 | char path[PATH_MAX]; | 272 | char path[PATH_MAX]; |
@@ -293,7 +293,7 @@ static struct cpu_map *pmu_cpumask(char *name) | |||
293 | return cpus; | 293 | return cpus; |
294 | } | 294 | } |
295 | 295 | ||
296 | static struct perf_pmu *pmu_lookup(char *name) | 296 | static struct perf_pmu *pmu_lookup(const char *name) |
297 | { | 297 | { |
298 | struct perf_pmu *pmu; | 298 | struct perf_pmu *pmu; |
299 | LIST_HEAD(format); | 299 | LIST_HEAD(format); |
@@ -330,7 +330,7 @@ static struct perf_pmu *pmu_lookup(char *name) | |||
330 | return pmu; | 330 | return pmu; |
331 | } | 331 | } |
332 | 332 | ||
333 | static struct perf_pmu *pmu_find(char *name) | 333 | static struct perf_pmu *pmu_find(const char *name) |
334 | { | 334 | { |
335 | struct perf_pmu *pmu; | 335 | struct perf_pmu *pmu; |
336 | 336 | ||
@@ -356,7 +356,7 @@ struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu) | |||
356 | return NULL; | 356 | return NULL; |
357 | } | 357 | } |
358 | 358 | ||
359 | struct perf_pmu *perf_pmu__find(char *name) | 359 | struct perf_pmu *perf_pmu__find(const char *name) |
360 | { | 360 | { |
361 | struct perf_pmu *pmu; | 361 | struct perf_pmu *pmu; |
362 | 362 | ||