[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-i6uyo6bsopa2dghnx8qo7rri@git.kernel.org>
Date: Thu, 16 Feb 2017 12:04:28 -0800
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: jolsa@...nel.org, tglx@...utronix.de, wangnan0@...wei.com,
namhyung@...nel.org, adrian.hunter@...el.com, mingo@...nel.org,
dsahern@...il.com, acme@...hat.com, hpa@...or.com,
linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf tools: Be consistent on the type of
map->symbols[] interator
Commit-ID: a0b2f5af4c99d3da7ce9bc2b3b4641c8ffd22615
Gitweb: http://git.kernel.org/tip/a0b2f5af4c99d3da7ce9bc2b3b4641c8ffd22615
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 14 Feb 2017 16:19:56 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 14 Feb 2017 16:19:56 -0300
perf tools: Be consistent on the type of map->symbols[] interator
In a few cases we were using 'enum map_type' and that triggered this
warning when using clang:
util/session.c:1923:16: error: comparison of constant 2 with expression of type 'enum map_type' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
for (i = 0; i < MAP__NR_TYPES; ++i) {
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-i6uyo6bsopa2dghnx8qo7rri@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/machine.c | 4 ++--
tools/perf/util/session.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index a1043cf..71c9720 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -782,7 +782,7 @@ static u64 machine__get_running_kernel_start(struct machine *machine,
int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel)
{
- enum map_type type;
+ int type;
u64 start = machine__get_running_kernel_start(machine, NULL);
/* In case of renewal the kernel map, destroy previous one */
@@ -813,7 +813,7 @@ int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel)
void machine__destroy_kernel_maps(struct machine *machine)
{
- enum map_type type;
+ int type;
for (type = 0; type < MAP__NR_TYPES; ++type) {
struct kmap *kmap;
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 349c681..4cdbc8f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1901,7 +1901,7 @@ int maps__set_kallsyms_ref_reloc_sym(struct map **maps,
const char *symbol_name, u64 addr)
{
char *bracket;
- enum map_type i;
+ int i;
struct ref_reloc_sym *ref;
ref = zalloc(sizeof(struct ref_reloc_sym));
Powered by blists - more mailing lists