Re: [PATCH] scsi: ips.c: use 64-bit time types
From: Arnd Bergmann
Date: Wed Oct 08 2014 - 16:41:53 EST
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@xxxxxxxxx>
>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/