]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
itimer: Fix the itimer trace print format
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2009 12:23:19 +0000 (13:23 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2009 12:23:19 +0000 (13:23 +0100)
Compiling powerpc64 results in:

include/trace/events/timer.h:279: warning:
format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
....

cputime_t on power is u64, which triggers the above warning.

Cast the cputime_t to unsigned long long and fix the print format
string. That works on both 32 and 64 bit architectures.

While at it change the print format for long variables from %lu to %ld.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
include/trace/events/timer.h

index e5ce87a0498da94355af6e0cfdda0bb88e843cec..9496b965d62ad9dd39929ccc7e471c7fcf2d374a 100644 (file)
@@ -301,8 +301,8 @@ TRACE_EVENT(itimer_state,
                __entry->interval_usec  = value->it_interval.tv_usec;
        ),
 
-       TP_printk("which=%d expires=%lu it_value=%lu.%lu it_interval=%lu.%lu",
-                 __entry->which, __entry->expires,
+       TP_printk("which=%d expires=%llu it_value=%ld.%ld it_interval=%ld.%ld",
+                 __entry->which, (unsigned long long)__entry->expires,
                  __entry->value_sec, __entry->value_usec,
                  __entry->interval_sec, __entry->interval_usec)
 );
@@ -331,8 +331,8 @@ TRACE_EVENT(itimer_expire,
                __entry->pid    = pid_nr(pid);
        ),
 
-           TP_printk("which=%d pid=%d now=%lu", __entry->which,
-                     (int) __entry->pid, __entry->now)
+       TP_printk("which=%d pid=%d now=%llu", __entry->which,
+                 (int) __entry->pid, (unsigned long long)__entry->now)
 );
 
 #endif /*  _TRACE_TIMER_H */