From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932677AbbJNNO2 (ORCPT ); Wed, 14 Oct 2015 09:14:28 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58786 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025AbbJNNOY (ORCPT ); Wed, 14 Oct 2015 09:14:24 -0400 Date: Wed, 14 Oct 2015 06:14:05 -0700 From: tip-bot for Rabin Vincent Message-ID: Cc: linux-kernel@vger.kernel.org, rabin.vincent@axis.com, jolsa@kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, hpa@zytor.com, mingo@kernel.org, rabinv@axis.com, tglx@linutronix.de Reply-To: jolsa@kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, hpa@zytor.com, linux-kernel@vger.kernel.org, rabin.vincent@axis.com, mingo@kernel.org, rabinv@axis.com, tglx@linutronix.de In-Reply-To: <1443379079-29133-1-git-send-email-rabin.vincent@axis.com> References: <1443379079-29133-1-git-send-email-rabin.vincent@axis.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf callchains: Fix unw_word_t pointer casts Git-Commit-ID: 186c6cfb32beae66140bc3c3fe4a519ee0234e33 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 186c6cfb32beae66140bc3c3fe4a519ee0234e33 Gitweb: http://git.kernel.org/tip/186c6cfb32beae66140bc3c3fe4a519ee0234e33 Author: Rabin Vincent AuthorDate: Sun, 27 Sep 2015 20:37:55 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 12 Oct 2015 23:27:40 -0300 perf callchains: Fix unw_word_t pointer casts 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 Acked-by: Jiri Olsa Cc: Peter Zijlstra Cc: Rabin Vincent Link: http://lkml.kernel.org/r/1443379079-29133-1-git-send-email-rabin.vincent@axis.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 ea993f6..f729f9e 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; }