Messages in this thread | | | From | Andreas Schwab <> | Subject | Re: [patch] timer_list should use signed numbers for relative times | Date | Tue, 27 Nov 2007 15:19:27 +0100 |
| |
Pavel Machek <pavel@ucw.cz> writes:
> Hi! > > >> > Relative times are signed by nature, and timers can (briefly) have >> > expires in past. Print them as negative numbers. >> > >> > Signed-off-by: Pavel Machek <pavel@suse.cz> >> > >> > diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c >> > index 12c5f4c..7f6eaa9 100644 >> > --- a/kernel/time/timer_list.c >> > +++ b/kernel/time/timer_list.c >> > @@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATS >> > SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); >> > #endif >> > SEQ_printf(m, "\n"); >> > - SEQ_printf(m, " # expires at %Lu nsecs [in %Lu nsecs]\n", >> > + SEQ_printf(m, " # expires at %Lu nsecs [in %Ld nsecs]\n", >> > (unsigned long long)ktime_to_ns(timer->expires), >> > (unsigned long long)(ktime_to_ns(timer->expires) - now)); >> >> Perhaps change the cast as well. > > Well, that seems to be absolute time, so %Lu makes some sense...
I don't understand what this has to do with the cast.
Andreas.
-- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |