mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Pavel Machek <pavel@ucw.cz>
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 13:59:12 +0100	[thread overview]
Message-ID: <jeaboz4zfj.fsf@sykes.suse.de> (raw)
In-Reply-To: <20071127124405.GA3943@elf.ucw.cz> (Pavel Machek's message of "Tue\, 27 Nov 2007 13\:44\:05 +0100")

Pavel Machek <pavel@ucw.cz> writes:

> 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.

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."

  reply	other threads:[~2007-11-27 12:59 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 [this message]
2007-11-27 14:08   ` Pavel Machek
2007-11-27 14:19     ` Andreas Schwab
2007-11-27 14:35       ` Pavel Machek

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=jeaboz4zfj.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --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®