Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246087
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/8] perf callchains: Fix unw_word_t pointer casts |
| Date | 2015-10-13 21:50 +0200 |
| Message-ID | <qjdKa-80D-43@gated-at.bofh.it> (permalink) |
| References | <qjdK9-80D-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Rabin Vincent <rabin.vincent@axis.com>
unw_word_t is uint64_t even on 32-bit MIPS. Cast it to uintptr_t before
the cast to void *p to get rid of the following errors:
util/unwind-libunwind.c: In function 'access_mem':
util/unwind-libunwind.c:464:4: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
util/unwind-libunwind.c:475:2: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
cc1: all warnings being treated as errors
make[3]: *** [util/unwind-libunwind.o] Error 1
Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rabin Vincent <rabinv@axis.com>
Link: http://lkml.kernel.org/r/1443379079-29133-1-git-send-email-rabin.vincent@axis.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/unwind-libunwind.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index ea993f6c7e0c..f729f9e99f99 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -463,7 +463,7 @@ static int access_mem(unw_addr_space_t __maybe_unused as,
if (ret) {
pr_debug("unwind: access_mem %p not inside range"
" 0x%" PRIx64 "-0x%" PRIx64 "\n",
- (void *) addr, start, end);
+ (void *) (uintptr_t) addr, start, end);
*valp = 0;
return ret;
}
@@ -473,7 +473,7 @@ static int access_mem(unw_addr_space_t __maybe_unused as,
offset = addr - start;
*valp = *(unw_word_t *)&stack->data[offset];
pr_debug("unwind: access_mem addr %p val %lx, offset %d\n",
- (void *) addr, (unsigned long)*valp, offset);
+ (void *) (uintptr_t) addr, (unsigned long)*valp, offset);
return 0;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 6/8] perf hists browser: Add 'm' key for context menu display Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 2/8] perf ui browsers: Remove help messages about use of right and arrow keys Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 4/8] perf callchain: Use debug_frame if eh_frame is unusable Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 5/8] perf callchains: Fix unw_word_t pointer casts Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 7/8] tools include: Fix strict-aliasing rules breakage Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 3/8] perf hists browser: Inform how to reset the symbol filter Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-10-14 15:10 +0200
csiph-web