summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/snic/snic_trc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-07-11 14:37:37 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-12 23:01:16 -0400
commit920447f138917d8d5b830b752cff5e5f747f67e8 (patch)
tree27c29986af18dd34ff4275769f7274f90718c796 /drivers/scsi/snic/snic_trc.c
parent0993ed922a3e62a66fcad41633985b127ecf71b0 (diff)
downloadlinux-920447f138917d8d5b830b752cff5e5f747f67e8.tar.bz2
scsi: snic: fix printing time intervals
We don't want to use 'struct timespec' because of the y2038 overflow problem. The overflow is not actually an issue here, but it's easy to replace with 'timespec64' for consistency. However, it's worth pointing out that nanosecond values have nine digits, not eight or ten, so I'm fixing the format strings accordingly as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/snic/snic_trc.c')
-rw-r--r--drivers/scsi/snic/snic_trc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
index f00ebf4717e0..fc60c933d6c0 100644
--- a/drivers/scsi/snic/snic_trc.c
+++ b/drivers/scsi/snic/snic_trc.c
@@ -65,12 +65,12 @@ static int
snic_fmt_trc_data(struct snic_trc_data *td, char *buf, int buf_sz)
{
int len = 0;
- struct timespec tmspec;
+ struct timespec64 tmspec;
- jiffies_to_timespec(td->ts, &tmspec);
+ jiffies_to_timespec64(td->ts, &tmspec);
len += snprintf(buf, buf_sz,
- "%lu.%10lu %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
+ "%llu.%09lu %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
tmspec.tv_sec,
tmspec.tv_nsec,
td->fn,