Re: [PATCH] scsi: ips.c: use 64-bit time types

Arnd Bergmann
2014-10-08T20:41:23Z

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