From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752059AbbJJPt7 (ORCPT ); Sat, 10 Oct 2015 11:49:59 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:34848 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbbJJPt5 (ORCPT ); Sat, 10 Oct 2015 11:49:57 -0400 Date: Sat, 10 Oct 2015 17:49:40 +0200 From: Rabin Vincent To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts Message-ID: <20151010154940.GA26352@debian> References: <1443379079-29133-1-git-send-email-rabin.vincent@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443379079-29133-1-git-send-email-rabin.vincent@axis.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, Do you have any comments on this patch set? Thanks. On Sun, Sep 27, 2015 at 08:37:55PM +0200, Rabin Vincent wrote: > 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 > --- > 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 > > -- > 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/