Commit 399c5acd authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Heiko Carstens

s390/dasd: avoid calling do_gettimeofday()

do_gettimeofday() is deprecated because it's not y2038-safe on
32-bit architectures. Since it is basically a wrapper around
ktime_get_real_ts64(), we can just call that function directly
instead.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
[sth@linux.vnet.ibm.com: fix build]
Signed-off-by: default avatarStefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 978fa72e
...@@ -295,7 +295,7 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device, ...@@ -295,7 +295,7 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device,
{ {
struct dasd_ccw_req *temp_cqr; struct dasd_ccw_req *temp_cqr;
int data_size; int data_size;
struct timeval tv; struct timespec64 ts;
struct dasd_eer_header header; struct dasd_eer_header header;
unsigned long flags; unsigned long flags;
struct eerbuffer *eerb; struct eerbuffer *eerb;
...@@ -309,9 +309,9 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device, ...@@ -309,9 +309,9 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device,
header.total_size = sizeof(header) + data_size + 4; /* "EOR" */ header.total_size = sizeof(header) + data_size + 4; /* "EOR" */
header.trigger = trigger; header.trigger = trigger;
do_gettimeofday(&tv); ktime_get_real_ts64(&ts);
header.tv_sec = tv.tv_sec; header.tv_sec = ts.tv_sec;
header.tv_usec = tv.tv_usec; header.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
strncpy(header.busid, dev_name(&device->cdev->dev), strncpy(header.busid, dev_name(&device->cdev->dev),
DASD_EER_BUSID_SIZE); DASD_EER_BUSID_SIZE);
...@@ -339,7 +339,7 @@ static void dasd_eer_write_snss_trigger(struct dasd_device *device, ...@@ -339,7 +339,7 @@ static void dasd_eer_write_snss_trigger(struct dasd_device *device,
{ {
int data_size; int data_size;
int snss_rc; int snss_rc;
struct timeval tv; struct timespec64 ts;
struct dasd_eer_header header; struct dasd_eer_header header;
unsigned long flags; unsigned long flags;
struct eerbuffer *eerb; struct eerbuffer *eerb;
...@@ -352,9 +352,9 @@ static void dasd_eer_write_snss_trigger(struct dasd_device *device, ...@@ -352,9 +352,9 @@ static void dasd_eer_write_snss_trigger(struct dasd_device *device,
header.total_size = sizeof(header) + data_size + 4; /* "EOR" */ header.total_size = sizeof(header) + data_size + 4; /* "EOR" */
header.trigger = DASD_EER_STATECHANGE; header.trigger = DASD_EER_STATECHANGE;
do_gettimeofday(&tv); ktime_get_real_ts64(&ts);
header.tv_sec = tv.tv_sec; header.tv_sec = ts.tv_sec;
header.tv_usec = tv.tv_usec; header.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
strncpy(header.busid, dev_name(&device->cdev->dev), strncpy(header.busid, dev_name(&device->cdev->dev),
DASD_EER_BUSID_SIZE); DASD_EER_BUSID_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment