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
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
>>
>>
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
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
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
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;
>
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;
> >>
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
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
> 在 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
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
>> 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:
>
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
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
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
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
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
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
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,
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 /
20 matches
Mail list logo