public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts
@ 2015-09-27 18:37 Rabin Vincent
  2015-09-27 18:37 ` [PATCH 2/5] perf: unwind: pass symbol source to libunwind Rabin Vincent
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Rabin Vincent @ 2015-09-27 18:37 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel, Rabin Vincent

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>
---
 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 4c00507..ef799dc 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -461,7 +461,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;
 		}
@@ -471,7 +471,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;
 }
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-10-14 13:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27 18:37 [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts Rabin Vincent
2015-09-27 18:37 ` [PATCH 2/5] perf: unwind: pass symbol source to libunwind Rabin Vincent
2015-10-12 11:24   ` Jiri Olsa
2015-10-12 12:35     ` Namhyung Kim
2015-10-13 10:51       ` Rabin Vincent
2015-09-27 18:37 ` [PATCH 3/5] perf: unwind: use debug_frame if eh_frame is unusable Rabin Vincent
2015-10-12 11:28   ` Jiri Olsa
2015-10-14 13:13   ` [tip:perf/core] perf callchain: Use " tip-bot for Rabin Vincent
2015-09-27 18:37 ` [PATCH 4/5] tools: build: fix libiberty feature detection Rabin Vincent
2015-10-12 11:35   ` Jiri Olsa
2015-10-13 11:00     ` Rabin Vincent
2015-09-27 18:37 ` [PATCH 5/5] perf: add Makefile.deps for easier cross compiling Rabin Vincent
2015-10-12 11:42   ` Jiri Olsa
2015-10-13 10:50     ` Rabin Vincent
2015-10-13 11:52       ` Jiri Olsa
2015-10-10 15:49 ` [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts Rabin Vincent
2015-10-10 23:34   ` Arnaldo Carvalho de Melo
2015-10-12  8:38     ` Jiri Olsa
2015-10-14 13:14 ` [tip:perf/core] perf callchains: Fix " tip-bot for Rabin Vincent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox