ftrace: Format MCOUNT_ADDR address as type unsigned long
authorMinfei Huang <mnfhuang@gmail.com>
Sun, 12 Jul 2015 09:52:24 +0000 (17:52 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 21 Jul 2015 02:30:53 +0000 (22:30 -0400)
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.

Link: http://lkml.kernel.org/r/1436694744-16747-1-git-send-email-mhuang@redhat.com
Cc: Minfei Huang <mnfhuang@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/metag/include/asm/ftrace.h
arch/microblaze/include/asm/ftrace.h
arch/powerpc/include/asm/ftrace.h
arch/sh/include/asm/ftrace.h
arch/sparc/include/asm/ftrace.h
arch/x86/include/asm/ftrace.h

index 2901f0f7d944ec55dbc47a45adcd27824ec14ba0..a2269d60a945bc3cfc9f088afd0731228a27583b 100644 (file)
@@ -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)
 {
index fd2fa2eca62f18fe2541300a8ffc5453632760d7..da0144f40d99d5bc5590838dec4b59e07e0a9b31 100644 (file)
@@ -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__
index e3661872fbea5b03888aa88c35753bcfc9983403..ef89b14655731006c7adac49afbe26a073782868 100644 (file)
@@ -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__
index e79fb6ebaa42370d7db5295355842bbd3b25edaa..1f157b86eaa7a188cd2203a9eebe5888c259acdb 100644 (file)
@@ -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))
index 9ec94ad116fbdded41d184e4b11f3adb8d0544f7..3192a8e42fd62c6f244a2b5ba5887da395847abd 100644 (file)
@@ -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__
index f45acad3c4b67849922f6d05b6c32e8744e0b258..24938852db3013e0290df0b2ff77c2aafeff73d3 100644 (file)
@@ -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 */