[Y2038] [PATCH v3] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
This patch replaces timeval with timespec64 as 32 bit 'struct timeval' will not give current time beyond 2038. The patch changes the code to use ktime_get_real_ts64() which returns a 'struct timespec64' instead of do_gettimeofday() which returns a 'struct timeval' This patch also alters the

Re: [Y2038] [PATCH V2] hp_sdc: fixed y2038 problem

2015-10-23 Thread Pingbo Wen
On Friday, October 23, 2015 05:25 PM, Arnd Bergmann wrote: > On Friday 23 October 2015 16:53:26 WEN Pingbo wrote: >> 1. Converting timeval to ktime_t, and there is no need to handle sec and >> usec separately >> >> 2. hp_sdc.rtv is only used for time diff, monotonic time is better here >> >>

Re: [Y2038] [Outreachy kernel] [PATCH v2] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 17:52:06 Amitoj Kaur Chawla wrote: > This patch replaces timeval with timespec64 as 32 bit 'struct timeval' > will not give current time beyond 2038. > > The patch changes the code to use ktime_get_real_ts64() which returns > a 'struct timespec64' instead of

Re: [Y2038] [Outreachy kernel] [PATCH v2] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 7:17 PM, Arnd Bergmann wrote: > On Friday 23 October 2015 15:39:49 Arnd Bergmann wrote: >> On Friday 23 October 2015 17:52:06 Amitoj Kaur Chawla wrote: >> > This patch replaces timeval with timespec64 as 32 bit 'struct timeval' >> > will not give current

Re: [Y2038] [Outreachy kernel] Re: [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 5:55 PM, Julia Lawall wrote: > > > On Fri, 23 Oct 2015, Amitoj Kaur Chawla wrote: > >> >> Okay! Next patches will be the simple tasks. Also, I couldn't find the >> >> tutorial you mentioned for compiling, can you help me out some there? >> > >> > I

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] hil_mlc: convert timeval to timespec64

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 17:12:38 Pingbo Wen wrote: > On Monday, October 19, 2015 04:58 PM, Arnd Bergmann wrote: > >> -do_gettimeofday(); > >> -tv.tv_usec += USEC_PER_SEC * (tv.tv_sec - > >> mlc->instart.tv_sec); > >> -tv.tv_usec -= mlc->instart.tv_usec; > >>

[Y2038] [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 V3] hp_sdc: convert struct timeval to ktime_t

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 20:19:46 Pingbo Wen wrote: > > > Also, we don't normally have enumerated lists in a changelog, just use > > normal text. The best changelogs typically have three paragraphs: > > > > The first paragraph describes what the driver currently does. For really > > obvious

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

Re: [Y2038] [Outreachy kernel] Re: [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
>> Okay! Next patches will be the simple tasks. Also, I couldn't find the >> tutorial you mentioned for compiling, can you help me out some there? > > I think the tutorial mentioned is kernel newbies First patch tutorial and > under > section Make a driver change: >

[Y2038] [PATCH V3 2/2] hil_mlc: convert timeval to jiffies

2015-10-23 Thread WEN Pingbo
struct timeval is not y2038 safe, and what mlc->instart do is scheduling a task in a fixed timeout, so jiffies is the simplest choice here. In hilse_donode(), the expires in mod_timer equals jiffies + intimeout - (now - instart) If we use jiffies in 'now', the expires equals

Re: [Y2038] [Outreachy kernel] Re: [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Saturday 24 October 2015 00:58:12 Amitoj Kaur Chawla wrote: > On Sat, Oct 24, 2015 at 12:53 AM, Arnd Bergmann wrote: > > On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: > >> This patch replaces timeval with timespec64 as 32 bit 'struct timeval' > >> will not give

Re: [Y2038] [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: > This patch replaces timeval with timespec64 as 32 bit 'struct timeval' > will not give current time beyond 2038. > > The patch changes the code to use ktime_get_real_ts64() which returns > a 'struct timespec64' instead of

Re: [Y2038] [PATCH v2] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Saturday 24 October 2015 01:21:04 Amitoj Kaur Chawla wrote: > This patch replaces timeval with timespec64 as 32 bit 'struct timeval' > will not give current time beyond 2038. > > The patch changes the code to use ktime_get_real_ts64() which returns > a 'struct timespec64' instead of

Re: [Y2038] [Outreachy kernel] Re: [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Sat, Oct 24, 2015 at 1:04 AM, Arnd Bergmann wrote: > On Saturday 24 October 2015 00:58:12 Amitoj Kaur Chawla wrote: >> On Sat, Oct 24, 2015 at 12:53 AM, Arnd Bergmann wrote: >> > On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: >> >> This patch

Re: [Y2038] [Outreachy kernel] [PATCH v2] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 19:28:00 Amitoj Kaur Chawla wrote: > On Fri, Oct 23, 2015 at 7:17 PM, Arnd Bergmann wrote: > > On Friday 23 October 2015 15:39:49 Arnd Bergmann wrote: > >> On Friday 23 October 2015 17:52:06 Amitoj Kaur Chawla wrote: > >> > This patch replaces timeval with

[Y2038] [PATCH] usb: usbtest: Add new ioctl interface

2015-10-23 Thread Deepa Dinamani
On Thu, Oct 22, 2015 at 1:45 PM, Arnd Bergmann wrote: > On Thursday 22 October 2015 09:43:25 Deepa Dinamani wrote: > > On Thu, Oct 22, 2015 at 2:36 AM, Arnd Bergmann wrote: > > > On Wednesday 21 October 2015 18:03:02 Deepa Dinamani wrote: > > > > On Wed, Oct 21,

Re: [Y2038] [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Arnd Bergmann
On Friday 23 October 2015 08:55:22 Amitoj Kaur Chawla wrote: > > > > Just to clarify, I should change this to > >sprintf(buf, "%llu.%8.8lu", now.tv_sec, now.tv_nsec / NSEC_PER_USEC); > > > > Sorry, it should be changed to > sprintf(buf, "%llu.%.08lu", (long long)now.tv_sec, now.tv_nsec /