]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aacraid: use timespec64 instead of timeval
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Nov 2017 10:46:05 +0000 (11:46 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Nov 2017 23:08:01 +0000 (18:08 -0500)
commitb55b641556141f94a85486293c0ce657add9c50b
treefa0c4b29d91aa23c785fc1a18784d28e7cddb59e
parent14b04c3d6c34c0e608ba54df8d751a8c2236d19f
scsi: aacraid: use timespec64 instead of timeval

aacraid passes the current time to the firmware in one of two ways,
either as year/month/day/... or as 32-bit unsigned seconds.

The first one is broken on 32-bit architectures as it cannot go past
year 2038. Using timespec64 here makes it behave properly on both 32-bit
and 64-bit architectures, and avoids relying on signed integer overflow
to pass times into the second interface.

The interface used in aac_send_hosttime() however is still problematic
in year 2106 when 32-bit seconds overflow. Hopefully we don't have to
worry about aacraid by that time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/commsup.c