Re: [PATCH v2] scsi: pmcraid: Remove usage of struct timeval

Arnd Bergmann
2015-02-25T08:41:32Z

On Wednesday 25 February 2015 07:49:21 Tina Ruchandani wrote:
> struct timeval will have its tv_sec field overflow on 32-bit systems
> in year 2038 and beyond. This patch removes the usage of struct timeval
> and instead uses 64-bit ktime_t to get the current milliseconds
> to populate pmcraid_timestamp_data.
>
> Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

I notice that this patch also increases the accuracy of the timestamp
from seconds to milliseconds, where the original code ignores the
sub-second portion of the timeval.

Doing this will make the the function a little slower, but I have
verified that it is only called for probe, reset and config-change,
all of which are not timing critical.

Arnd