timer_list should use signed numbers for relative times
PATCH 1/1 timer_list should use signed numbers for relative times
Relative times are signed by nature, and timers can (briefly) have expires in past. Print them as negative numbers.
kernel/time/timer_list.c +1 -1
@@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATSSEQ_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)); }
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 10 lines · Pavel Machek
Relative times are signed by nature, and timers can (briefly) have expires in past. Print them as negative numbers.
Signed-off-by Pavel Machek <[email protected]>kernel/time/timer_list.c +0
-0
kernel/time/timer_list.c #ifdef CONFIG_TIMER_STATS · line 70
Quoted 7 lines
kernel/time/timer_list.c +1
-1@@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATSSEQ_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.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] 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."
Hi!
Quoted 5 lines
Quoted 5 lines
Relative times are signed by nature, and timers can (briefly) have expires in past. Print them as negative numbers.
Signed-off-by Pavel Machek <[email protected]>
Quoted 14 lines
kernel/time/timer_list.c #ifdef CONFIG_TIMER_STATS · line 70
Quoted 12 lines
kernel/time/timer_list.c +1
-1@@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATSSEQ_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...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 23 lines · Pavel Machek
Hi!
Quoted 5 lines
Quoted 5 lines
Relative times are signed by nature, and timers can (briefly) have expires in past. Print them as negative numbers.
Signed-off-by Pavel Machek <[email protected]>Quoted 14 lines
kernel/time/timer_list.c #ifdef CONFIG_TIMER_STATS · line 70
Quoted 12 lines
kernel/time/timer_list.c +1
-1@@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATSSEQ_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.
Quoted 1 line
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.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] 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."
Quoted 25 lines · Andreas Schwab
Quoted 23 lines · Pavel Machek
Hi!
Quoted 19 lines
Quoted 10 lines
Relative times are signed by nature, and timers can (briefly) have expires in past. Print them as negative numbers.
Signed-off-by Pavel Machek <[email protected]>kernel/time/timer_list.c +0
-0kernel/time/timer_list.c #ifdef CONFIG_TIMER_STATS · line 70
Quoted 7 lines
kernel/time/timer_list.c +1
-1@@ -65,7 +65,7 @@ #ifdef CONFIG_TIMER_STATSSEQ_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.
Quoted 3 lines
Quoted 1 line
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
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html