lkml.org 
[lkml]   [2014]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] scsi: ips.c: use 64-bit time types
Date
On Wednesday 08 October 2014 23:14:08 Ebru Akagunduz wrote:
> This patch changes 32-bit time types to 64-bit in
> ips.c
>
> time_t can only represent signed 32-bit dates but
> the driver should represent dates that are after
> January 2038.
>
> Use time64_t type instead of time_t.
>
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
>

Hi Ebru,

I think you missed the location in which ffdc_time is initially
assigned, and wher it gets compared to the current time:

struct timeval tv;

do_gettimeofday(&tv);
ha->last_ffdc = tv.tv_sec;

This needs to be changed to timespec64 to actually avoid the
overflow problem. I think this one should also use monotonic time,
i.e. ktime_get_ts64 rather than getnstimeofday64.

Arnd


\
 
 \ /
  Last update: 2014-10-08 23:21    [W:1.226 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site