diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2016-10-02 01:48:14 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 23:29:46 +0100 |
commit | 48c4676dcbfc731a197bcf01763fcd07d9dc6725 (patch) | |
tree | 0b50a978af6e65a5c7d637e6b1cae0de6cd972a8 /drivers/scsi/fnic/fnic_trace.c | |
parent | scsi: ipr: Use pci_irq_allocate_vectors (diff) | |
download | linux-48c4676dcbfc731a197bcf01763fcd07d9dc6725.tar.xz linux-48c4676dcbfc731a197bcf01763fcd07d9dc6725.zip |
scsi: fnic: Use time64_t to represent trace timestamps
Trace timestamps use struct timespec and CURRENT_TIME which are not
y2038 safe. These timestamps are only part of the trace log on the
machine and are not shared with the fnic. Replace then with y2038 safe
struct timespec64 and ktime_get_real_ts64(), respectively.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Hiral Patel <hiralpat@cisco.com>
Cc: Suma Ramars <sramars@cisco.com>
Cc: Brian Uchino <buchino@cisco.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fnic/fnic_trace.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c index 4e15c4bf0795..5a5fa01576b7 100644 --- a/drivers/scsi/fnic/fnic_trace.c +++ b/drivers/scsi/fnic/fnic_trace.c @@ -613,7 +613,7 @@ int fnic_fc_trace_set_data(u32 host_no, u8 frame_type, fc_trace_entries.rd_idx = 0; } - fc_buf->time_stamp = CURRENT_TIME; + ktime_get_real_ts64(&fc_buf->time_stamp); fc_buf->host_no = host_no; fc_buf->frame_type = frame_type; @@ -740,7 +740,7 @@ void copy_and_format_trace_data(struct fc_trace_hdr *tdata, len = *orig_len; - time_to_tm(tdata->time_stamp.tv_sec, 0, &tm); + time64_to_tm(tdata->time_stamp.tv_sec, 0, &tm); fmt = "%02d:%02d:%04ld %02d:%02d:%02d.%09lu ns%8x %c%8x\t"; len += snprintf(fnic_dbgfs_prt->buffer + len, |