lkml.org 
[lkml]   [2019]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Y2038] [PATCH 21/23] y2038: itimer: change implementation to timespec64
From
Date
On Fri, 2019-11-08 at 22:12 +0100, Arnd Bergmann wrote:
[...]
> @@ -292,8 +296,8 @@ static unsigned int alarm_setitimer(unsigned int seconds)
> * We can't return 0 if we have an alarm pending ... And we'd
> * better return too much than too little anyway
> */
> - if ((!it_old.it_value.tv_sec && it_old.it_value.tv_usec) ||
> - it_old.it_value.tv_usec >= 500000)
> + if ((!it_old.it_value.tv_sec && it_old.it_value.tv_nsec) ||
> + it_old.it_value.tv_nsec >= 500000)
[...]

This is now off by a factor of 1000. It might be helpful to use
NSEC_PER_SEC / 2 here so no-one has to count the 0 digits.

Ben.

--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom

\
 
 \ /
  Last update: 2019-11-21 17:52    [W:0.364 / U:0.140 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site