From: Pavel Machek <pavel@ucw.cz>
To: Andreas Schwab <schwab@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
kernel list <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>
Subject: Re: [patch] timer_list should use signed numbers for relative times
Date: Tue, 27 Nov 2007 15:35:30 +0100 [thread overview]
Message-ID: <20071127143530.GA18771@elf.ucw.cz> (raw)
In-Reply-To: <je3aur4vps.fsf@sykes.suse.de>
On Tue 2007-11-27 15:19:27, Andreas Schwab wrote:
> 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.
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
prev parent reply other threads:[~2007-11-27 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 12:44 Pavel Machek
2007-11-27 12:59 ` Andreas Schwab
2007-11-27 14:08 ` Pavel Machek
2007-11-27 14:19 ` Andreas Schwab
2007-11-27 14:35 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071127143530.GA18771@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwab@suse.de \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®