[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071127143530.GA18771@elf.ucw.cz>
Date: Tue, 27 Nov 2007 15:35:30 +0100
From: Pavel Machek <pavel@....cz>
To: Andreas Schwab <schwab@...e.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
kernel list <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>, Andrew Morton <akpm@...l.org>
Subject: Re: [patch] timer_list should use signed numbers for relative times
On Tue 2007-11-27 15:19:27, Andreas Schwab wrote:
> Pavel Machek <pavel@....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@...e.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.
Aha, stupid me, yes, you are right, fixed.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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