From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756450AbXK0Oe6 (ORCPT ); Tue, 27 Nov 2007 09:34:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752372AbXK0Oeu (ORCPT ); Tue, 27 Nov 2007 09:34:50 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.31.123]:46025 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbXK0Oeu (ORCPT ); Tue, 27 Nov 2007 09:34:50 -0500 Date: Tue, 27 Nov 2007 15:35:30 +0100 From: Pavel Machek To: Andreas Schwab Cc: Thomas Gleixner , kernel list , Ingo Molnar , Andrew Morton Subject: Re: [patch] timer_list should use signed numbers for relative times Message-ID: <20071127143530.GA18771@elf.ucw.cz> References: <20071127124405.GA3943@elf.ucw.cz> <20071127140843.GA14570@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.16 (2007-06-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2007-11-27 15:19:27, Andreas Schwab wrote: > Pavel Machek 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 > >> > > >> > 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