diff options
Diffstat (limited to 'tools/perf/arch')
-rw-r--r-- | tools/perf/arch/arm64/util/mem-events.c | 2 | ||||
-rw-r--r-- | tools/perf/arch/powerpc/util/mem-events.c | 6 | ||||
-rw-r--r-- | tools/perf/arch/x86/util/mem-events.c | 8 | ||||
-rw-r--r-- | tools/perf/arch/x86/util/pmu.c | 10 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tools/perf/arch/arm64/util/mem-events.c b/tools/perf/arch/arm64/util/mem-events.c index df817d1f9f3e..3bcc5c7035c2 100644 --- a/tools/perf/arch/arm64/util/mem-events.c +++ b/tools/perf/arch/arm64/util/mem-events.c @@ -20,7 +20,7 @@ struct perf_mem_event *perf_mem_events__ptr(int i) return &perf_mem_events[i]; } -char *perf_mem_events__name(int i, char *pmu_name __maybe_unused) +const char *perf_mem_events__name(int i, const char *pmu_name __maybe_unused) { struct perf_mem_event *e = perf_mem_events__ptr(i); diff --git a/tools/perf/arch/powerpc/util/mem-events.c b/tools/perf/arch/powerpc/util/mem-events.c index 4120fafe0be4..78b986e5268d 100644 --- a/tools/perf/arch/powerpc/util/mem-events.c +++ b/tools/perf/arch/powerpc/util/mem-events.c @@ -3,10 +3,10 @@ #include "mem-events.h" /* PowerPC does not support 'ldlat' parameter. */ -char *perf_mem_events__name(int i, char *pmu_name __maybe_unused) +const char *perf_mem_events__name(int i, const char *pmu_name __maybe_unused) { if (i == PERF_MEM_EVENTS__LOAD) - return (char *) "cpu/mem-loads/"; + return "cpu/mem-loads/"; - return (char *) "cpu/mem-stores/"; + return "cpu/mem-stores/"; } diff --git a/tools/perf/arch/x86/util/mem-events.c b/tools/perf/arch/x86/util/mem-events.c index a8a782bcb121..191b372f9a2d 100644 --- a/tools/perf/arch/x86/util/mem-events.c +++ b/tools/perf/arch/x86/util/mem-events.c @@ -52,7 +52,7 @@ bool is_mem_loads_aux_event(struct evsel *leader) return leader->core.attr.config == MEM_LOADS_AUX; } -char *perf_mem_events__name(int i, char *pmu_name) +const char *perf_mem_events__name(int i, const char *pmu_name) { struct perf_mem_event *e = perf_mem_events__ptr(i); @@ -65,7 +65,7 @@ char *perf_mem_events__name(int i, char *pmu_name) if (!pmu_name) { mem_loads_name__init = true; - pmu_name = (char *)"cpu"; + pmu_name = "cpu"; } if (perf_pmus__have_event(pmu_name, "mem-loads-aux")) { @@ -82,12 +82,12 @@ char *perf_mem_events__name(int i, char *pmu_name) if (i == PERF_MEM_EVENTS__STORE) { if (!pmu_name) - pmu_name = (char *)"cpu"; + pmu_name = "cpu"; scnprintf(mem_stores_name, sizeof(mem_stores_name), e->name, pmu_name); return mem_stores_name; } - return (char *)e->name; + return e->name; } diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c index 65d8cdff4d5f..f428cffb0378 100644 --- a/tools/perf/arch/x86/util/pmu.c +++ b/tools/perf/arch/x86/util/pmu.c @@ -126,7 +126,7 @@ close_dir: return ret; } -static char *__pmu_find_real_name(const char *name) +static const char *__pmu_find_real_name(const char *name) { struct pmu_alias *pmu_alias; @@ -135,10 +135,10 @@ static char *__pmu_find_real_name(const char *name) return pmu_alias->name; } - return (char *)name; + return name; } -char *pmu_find_real_name(const char *name) +const char *pmu_find_real_name(const char *name) { if (cached_list) return __pmu_find_real_name(name); @@ -149,7 +149,7 @@ char *pmu_find_real_name(const char *name) return __pmu_find_real_name(name); } -static char *__pmu_find_alias_name(const char *name) +static const char *__pmu_find_alias_name(const char *name) { struct pmu_alias *pmu_alias; @@ -160,7 +160,7 @@ static char *__pmu_find_alias_name(const char *name) return NULL; } -char *pmu_find_alias_name(const char *name) +const char *pmu_find_alias_name(const char *name) { if (cached_list) return __pmu_find_alias_name(name); |