trace: fix printk warning for u64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Rothwell
Date: Sunday, October 26, 2008 - 11:43 pm

A powerpc ppc64_defconfig build produces these warnings:

kernel/trace/ring_buffer.c: In function 'rb_add_time_stamp':
kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type 'u64'
kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u64'
kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'u64'

Just cast the u64s to unsigned long long like we do everywhere else.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

---

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 94af1fe..faf3be9 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -966,7 +966,9 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
 	if (unlikely(*delta > (1ULL << 59) && !once++)) {
 		printk(KERN_WARNING "Delta way too big! %llu"
 		       " ts=%llu write stamp = %llu\n",
-		       *delta, *ts, cpu_buffer->write_stamp);
+		       (unsigned long long)*delta,
+		       (unsigned long long)*ts,
+		       (unsigned long long)cpu_buffer->write_stamp);
 		WARN_ON(1);
 	}
 
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
trace: fix printk warning for u64, Stephen Rothwell, (Sun Oct 26, 11:43 pm)
Re: trace: fix printk warning for u64, Ingo Molnar, (Mon Oct 27, 2:52 am)
Re: trace: fix printk warning for u64, Steven Rostedt, (Mon Oct 27, 3:26 am)
Re: trace: fix printk warning for u64, Stephen Rothwell, (Mon Oct 27, 6:12 am)
Re: trace: fix printk warning for u64, Andrew Morton, (Mon Oct 27, 10:06 pm)
Re: trace: fix printk warning for u64, Ingo Molnar, (Tue Oct 28, 2:08 am)