public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minfei Huang <mnfhuang@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	James Hogan <james.hogan@imgtec.com>,
	Michal Simek <monstr@monstr.eu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: [for-next][PATCH 13/14] ftrace: Format MCOUNT_ADDR address as type unsigned long
Date: Sat, 29 Aug 2015 11:02:28 -0400	[thread overview]
Message-ID: <20150829150240.323096138@goodmis.org> (raw)
In-Reply-To: 20150829150215.458315917@goodmis.org

[-- Attachment #1: 0013-ftrace-Format-MCOUNT_ADDR-address-as-type-unsigned-l.patch --]
[-- Type: text/plain, Size: 3818 bytes --]

From: Minfei Huang <mnfhuang@gmail.com>

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      | 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 2901f0f7d944..a2269d60a945 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 fd2fa2eca62f..da0144f40d99 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 e3661872fbea..ef89b1465573 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 e79fb6ebaa42..1f157b86eaa7 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 9ec94ad116fb..3192a8e42fd6 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 f45acad3c4b6..24938852db30 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 */
 
-- 
2.4.6



  parent reply	other threads:[~2015-08-29 15:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29 15:02 [for-next][PATCH 00/14] tracing: Updates for 4.3 Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 01/14] tracing: Prefer kcalloc over kzalloc with multiply Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 02/14] tracing: Fix for non-continuous cpu ids Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 03/14] ftrace: correct the counter increment for trace_buffer data Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 04/14] ring-buffer: Add event descriptor to simplify passing data Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 05/14] ring-buffer: Move the adding of the extended timestamp out of line Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 06/14] ring-buffer: Get timestamp after event is allocated Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 07/14] ring-buffer: Make sure event has enough room for extend and padding Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 08/14] ring-buffer: Reorganize function locations Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 09/14] tracing: Clean up stack tracing and fix fentry updates Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 10/14] ftrace: add tracing_thresh to function profile Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 11/14] ftrace: Fix function_graph duration spacing with 7-digits Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 12/14] tracing: Introduce two additional marks for delay Steven Rostedt
2015-08-29 15:02 ` Steven Rostedt [this message]
2015-08-29 15:02 ` [for-next][PATCH 14/14] tracing: Allow triggers to filter for CPU ids and process names Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150829150240.323096138@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mnfhuang@gmail.com \
    --cc=monstr@monstr.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox