Commit b6b96fb4 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf tools: Add const specifier to perf_pmu__find name parameter

The name parameter is constant, declare it so.
Signed-off-by: default avatarAdrian 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a609bda7
...@@ -73,7 +73,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head) ...@@ -73,7 +73,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head)
* located at: * located at:
* /sys/bus/event_source/devices/<dev>/format as sysfs group attributes. * /sys/bus/event_source/devices/<dev>/format as sysfs group attributes.
*/ */
static int pmu_format(char *name, struct list_head *format) static int pmu_format(const char *name, struct list_head *format)
{ {
struct stat st; struct stat st;
char path[PATH_MAX]; char path[PATH_MAX];
...@@ -162,7 +162,7 @@ static int pmu_aliases_parse(char *dir, struct list_head *head) ...@@ -162,7 +162,7 @@ static int pmu_aliases_parse(char *dir, struct list_head *head)
* Reading the pmu event aliases definition, which should be located at: * Reading the pmu event aliases definition, which should be located at:
* /sys/bus/event_source/devices/<dev>/events as sysfs group attributes. * /sys/bus/event_source/devices/<dev>/events as sysfs group attributes.
*/ */
static int pmu_aliases(char *name, struct list_head *head) static int pmu_aliases(const char *name, struct list_head *head)
{ {
struct stat st; struct stat st;
char path[PATH_MAX]; char path[PATH_MAX];
...@@ -208,7 +208,7 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias, ...@@ -208,7 +208,7 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias,
* located at: * located at:
* /sys/bus/event_source/devices/<dev>/type as sysfs attribute. * /sys/bus/event_source/devices/<dev>/type as sysfs attribute.
*/ */
static int pmu_type(char *name, __u32 *type) static int pmu_type(const char *name, __u32 *type)
{ {
struct stat st; struct stat st;
char path[PATH_MAX]; char path[PATH_MAX];
...@@ -266,7 +266,7 @@ static void pmu_read_sysfs(void) ...@@ -266,7 +266,7 @@ static void pmu_read_sysfs(void)
closedir(dir); closedir(dir);
} }
static struct cpu_map *pmu_cpumask(char *name) static struct cpu_map *pmu_cpumask(const char *name)
{ {
struct stat st; struct stat st;
char path[PATH_MAX]; char path[PATH_MAX];
...@@ -293,7 +293,7 @@ static struct cpu_map *pmu_cpumask(char *name) ...@@ -293,7 +293,7 @@ static struct cpu_map *pmu_cpumask(char *name)
return cpus; return cpus;
} }
static struct perf_pmu *pmu_lookup(char *name) static struct perf_pmu *pmu_lookup(const char *name)
{ {
struct perf_pmu *pmu; struct perf_pmu *pmu;
LIST_HEAD(format); LIST_HEAD(format);
...@@ -330,7 +330,7 @@ static struct perf_pmu *pmu_lookup(char *name) ...@@ -330,7 +330,7 @@ static struct perf_pmu *pmu_lookup(char *name)
return pmu; return pmu;
} }
static struct perf_pmu *pmu_find(char *name) static struct perf_pmu *pmu_find(const char *name)
{ {
struct perf_pmu *pmu; struct perf_pmu *pmu;
...@@ -356,7 +356,7 @@ struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu) ...@@ -356,7 +356,7 @@ struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu)
return NULL; return NULL;
} }
struct perf_pmu *perf_pmu__find(char *name) struct perf_pmu *perf_pmu__find(const char *name)
{ {
struct perf_pmu *pmu; struct perf_pmu *pmu;
......
...@@ -21,7 +21,7 @@ struct perf_pmu { ...@@ -21,7 +21,7 @@ struct perf_pmu {
struct list_head list; struct list_head list;
}; };
struct perf_pmu *perf_pmu__find(char *name); struct perf_pmu *perf_pmu__find(const char *name);
int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr, int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr,
struct list_head *head_terms); struct list_head *head_terms);
int perf_pmu__config_terms(struct list_head *formats, int perf_pmu__config_terms(struct list_head *formats,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment