Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 20:32:50 Pingbo Wen wrote: > >> -do_gettimeofday(); > >> -tv.tv_usec += USEC_PER_SEC * (tv.tv_sec - > >> mlc->instart.tv_sec); > >> -tv.tv_usec -= mlc->instart.tv_usec; > >> -if (tv.tv_usec >= mlc->intimeout) goto sched; >

Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Pingbo Wen
> 在 2015年10月23日,17:55,Arnd Bergmann 写道: > > On Friday 23 October 2015 17:24:59 WEN Pingbo wrote: >> Using struct timeval will cause time overflow in 2038, replacing it with >> ktime_t. And we don't need to handle sec and nsec separately. >> > > This part looks good now, but as I commented in

Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 17:24:59 WEN Pingbo wrote: > Using struct timeval will cause time overflow in 2038, replacing it with > ktime_t. And we don't need to handle sec and nsec separately. > > Since mlc->lcv_t is only interested in seconds, directly using > time64_t here. > > And monotonic

[PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread WEN Pingbo
Using struct timeval will cause time overflow in 2038, replacing it with ktime_t. And we don't need to handle sec and nsec separately. Since mlc->lcv_t is only interested in seconds, directly using time64_t here. And monotonic time is better here, since the original driver don't care the wall

Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 20:32:50 Pingbo Wen wrote: > >> -do_gettimeofday(); > >> -tv.tv_usec += USEC_PER_SEC * (tv.tv_sec - > >> mlc->instart.tv_sec); > >> -tv.tv_usec -= mlc->instart.tv_usec; > >> -if (tv.tv_usec >= mlc->intimeout) goto sched; >

[PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread WEN Pingbo
Using struct timeval will cause time overflow in 2038, replacing it with ktime_t. And we don't need to handle sec and nsec separately. Since mlc->lcv_t is only interested in seconds, directly using time64_t here. And monotonic time is better here, since the original driver don't care the wall

Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Pingbo Wen
> 在 2015年10月23日,17:55,Arnd Bergmann 写道: > > On Friday 23 October 2015 17:24:59 WEN Pingbo wrote: >> Using struct timeval will cause time overflow in 2038, replacing it with >> ktime_t. And we don't need to handle sec and nsec separately. >> > > This part looks good now, but as

Re: [Y2038] [PATCH V2] hil_mlc: convert timeval to ktime_t

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 17:24:59 WEN Pingbo wrote: > Using struct timeval will cause time overflow in 2038, replacing it with > ktime_t. And we don't need to handle sec and nsec separately. > > Since mlc->lcv_t is only interested in seconds, directly using > time64_t here. > > And monotonic