diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-06-18 17:26:47 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-26 11:57:01 -0400 |
commit | 38150f7a68ef736c4cbae53b6f1f2a19c55178a3 (patch) | |
tree | 4439be2f7e3c7c8f161a2c61b98decb7ec267395 /drivers/scsi/aacraid/sa.c | |
parent | a38b80c5f49c30c3cbd4523bdbde0cc725bb0e63 (diff) |
scsi: aacraid: stop using deprated get_seconds()
get_seconds() can overflow on 32-bit architectures and is deprecated
because of that. The use in the aacraid driver has the same problem due to
a limited firmware interface, it also overflows in the year 2106.
This changes all calls to get_seconds() to the non-deprecated
ktime_get_real_seconds(), which unfortunately doesn't solve that problem
but gets rid of one user of the deprecated interface.
[mkp: checkpatch]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/sa.c')
-rw-r--r-- | drivers/scsi/aacraid/sa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index 882f40353b96..efa96c1c6aa3 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c @@ -251,7 +251,7 @@ static void aac_sa_start_adapter(struct aac_dev *dev) * Fill in the remaining pieces of the init. */ init = dev->init; - init->r7.host_elapsed_seconds = cpu_to_le32(get_seconds()); + init->r7.host_elapsed_seconds = cpu_to_le32(ktime_get_real_seconds()); /* We can only use a 32 bit address here */ sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, 0, 0, 0, 0, 0, |