Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbbGMPEv (ORCPT ); Mon, 13 Jul 2015 11:04:51 -0400 Received: from smtprelay0134.hostedemail.com ([216.40.44.134]:36363 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750787AbbGMPEu (ORCPT ); Mon, 13 Jul 2015 11:04:50 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1535:1543:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3870:3871:3872:3874:4321:4605:5007:6261:7514:7576:7875:7903:8660:10004:10400:10481:10848:10967:11026:11232:11473:11657:11658:11914:12043:12296:12438:12517:12519:12555:12663:12740:13148:13161:13229:13230:14096:14097:19900:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: side30_8130c0deb3622 X-Filterd-Recvd-Size: 5093 Date: Mon, 13 Jul 2015 11:04:46 -0400 From: Steven Rostedt To: Minfei Huang Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, Minfei Huang , linux-arch@vger.kernel.org, "H. Peter Anvin" , James Hogan , Michal Simek , Benjamin Herrenschmidt , "David S. Miller" Subject: Re: [PATCH] ftrace: Format MCOUNT_ADDR address as type unsigned long Message-ID: <20150713110446.01c950ea@gandalf.local.home> In-Reply-To: <1436694744-16747-1-git-send-email-mhuang@redhat.com> References: <1436694744-16747-1-git-send-email-mhuang@redhat.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4124 Lines: 118 On Sun, 12 Jul 2015 17:52:24 +0800 Minfei Huang wrote: > From: Minfei Huang > > Always we use type unsigned long to format the ip address, since the > value of ip address is never the negative. > > This patch uses type unsigned long, instead of long, to format the ip > address. The code is more clearly to be viewed by using type unsigned > long, although it is correct by using either unsigned long or long. > The only place MCOUNT_ADDR is used in generic code is being passed into a parameter that is already typed "unsigned long". But I'm fine with the patch just to make it consistent. I added the appropriate Cc's for this patch too. -- Steve > Signed-off-by: Minfei Huang > --- > arch/metag/include/asm/ftrace.h | 2 +- > arch/microblaze/include/asm/ftrace.h | 2 +- > arch/powerpc/include/asm/ftrace.h | 2 +- > arch/sh/include/asm/ftrace.h | 2 +- > arch/sparc/include/asm/ftrace.h | 2 +- > arch/x86/include/asm/ftrace.h | 4 ++-- > 6 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/arch/metag/include/asm/ftrace.h b/arch/metag/include/asm/ftrace.h > index 2901f0f..a2269d6 100644 > --- a/arch/metag/include/asm/ftrace.h > +++ b/arch/metag/include/asm/ftrace.h > @@ -6,7 +6,7 @@ > > #ifndef __ASSEMBLY__ > extern void mcount_wrapper(void); > -#define MCOUNT_ADDR ((long)(mcount_wrapper)) > +#define MCOUNT_ADDR ((unsigned long)(mcount_wrapper)) > > static inline unsigned long ftrace_call_adjust(unsigned long addr) > { > diff --git a/arch/microblaze/include/asm/ftrace.h b/arch/microblaze/include/asm/ftrace.h > index fd2fa2ec..da0144f 100644 > --- a/arch/microblaze/include/asm/ftrace.h > +++ b/arch/microblaze/include/asm/ftrace.h > @@ -3,7 +3,7 @@ > > #ifdef CONFIG_FUNCTION_TRACER > > -#define MCOUNT_ADDR ((long)(_mcount)) > +#define MCOUNT_ADDR ((unsigned long)(_mcount)) > #define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */ > > #ifndef __ASSEMBLY__ > diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h > index e366187..ef89b14 100644 > --- a/arch/powerpc/include/asm/ftrace.h > +++ b/arch/powerpc/include/asm/ftrace.h > @@ -2,7 +2,7 @@ > #define _ASM_POWERPC_FTRACE > > #ifdef CONFIG_FUNCTION_TRACER > -#define MCOUNT_ADDR ((long)(_mcount)) > +#define MCOUNT_ADDR ((unsigned long)(_mcount)) > #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ > > #ifdef __ASSEMBLY__ > diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h > index e79fb6e..1f157b8 100644 > --- a/arch/sh/include/asm/ftrace.h > +++ b/arch/sh/include/asm/ftrace.h > @@ -9,7 +9,7 @@ > #ifndef __ASSEMBLY__ > extern void mcount(void); > > -#define MCOUNT_ADDR ((long)(mcount)) > +#define MCOUNT_ADDR ((unsigned long)(mcount)) > > #ifdef CONFIG_DYNAMIC_FTRACE > #define CALL_ADDR ((long)(ftrace_call)) > diff --git a/arch/sparc/include/asm/ftrace.h b/arch/sparc/include/asm/ftrace.h > index 9ec94ad..3192a8e 100644 > --- a/arch/sparc/include/asm/ftrace.h > +++ b/arch/sparc/include/asm/ftrace.h > @@ -2,7 +2,7 @@ > #define _ASM_SPARC64_FTRACE > > #ifdef CONFIG_MCOUNT > -#define MCOUNT_ADDR ((long)(_mcount)) > +#define MCOUNT_ADDR ((unsigned long)(_mcount)) > #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ > > #ifndef __ASSEMBLY__ > diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h > index f45acad..2493885 100644 > --- a/arch/x86/include/asm/ftrace.h > +++ b/arch/x86/include/asm/ftrace.h > @@ -3,9 +3,9 @@ > > #ifdef CONFIG_FUNCTION_TRACER > #ifdef CC_USING_FENTRY > -# define MCOUNT_ADDR ((long)(__fentry__)) > +# define MCOUNT_ADDR ((unsigned long)(__fentry__)) > #else > -# define MCOUNT_ADDR ((long)(mcount)) > +# define MCOUNT_ADDR ((unsigned long)(mcount)) > #endif > #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ > -- 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/