[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-16620e0f1990fa6d896a639449c4b3d678458464@git.kernel.org>
Date: Mon, 14 Dec 2009 09:48:30 GMT
From: tip-bot for Li Zefan <lizf@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
fweisbec@...il.com, rostedt@...dmis.org, lizf@...fujitsu.com,
tglx@...utronix.de, prasad@...ux.vnet.ibm.com
Subject: [tip:tracing/urgent] ksym_tracer: Fix bad cast
Commit-ID: 16620e0f1990fa6d896a639449c4b3d678458464
Gitweb: http://git.kernel.org/tip/16620e0f1990fa6d896a639449c4b3d678458464
Author: Li Zefan <lizf@...fujitsu.com>
AuthorDate: Tue, 8 Dec 2009 11:18:16 +0800
Committer: Frederic Weisbecker <fweisbec@...il.com>
CommitDate: Sun, 13 Dec 2009 18:46:54 +0100
ksym_tracer: Fix bad cast
Fix this warning:
kernel/trace/trace_ksym.c: In function 'ksym_trace_filter_read':
kernel/trace/trace_ksym.c:239: warning: cast to pointer from integer of different size
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
Cc: "K.Prasad" <prasad@...ux.vnet.ibm.com>
LKML-Reference: <4B1DC578.9020909@...fujitsu.com>
[remove the strstrip fix as tglx already fixed that]
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
kernel/trace/trace_ksym.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c
index 64e7a5b..48f1c6c 100644
--- a/kernel/trace/trace_ksym.c
+++ b/kernel/trace/trace_ksym.c
@@ -235,7 +235,8 @@ static ssize_t ksym_trace_filter_read(struct file *filp, char __user *ubuf,
mutex_lock(&ksym_tracer_mutex);
hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) {
- ret = trace_seq_printf(s, "%pS:", (void *)entry->attr.bp_addr);
+ ret = trace_seq_printf(s, "%pS:",
+ (void *)(unsigned long)entry->attr.bp_addr);
if (entry->attr.bp_type == HW_BREAKPOINT_R)
ret = trace_seq_puts(s, "r--\n");
else if (entry->attr.bp_type == HW_BREAKPOINT_W)
@@ -298,8 +299,8 @@ static ssize_t ksym_trace_filter_write(struct file *file,
* 2: echo 0 > ksym_trace_filter
* 3: echo "*:---" > ksym_trace_filter
*/
- if (!input_string[0] || !strcmp(input_string, "0") ||
- !strcmp(input_string, "*:---")) {
+ if (!buf[0] || !strcmp(buf, "0") ||
+ !strcmp(buf, "*:---")) {
__ksym_trace_reset();
ret = 0;
goto out;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists