Skip to content

Commit 7b040d4

Browse files
andy-shevpmladek
authored andcommitted
scsi: snic: Switch to use %ptSp
Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://patch.msgid.link/20251113150217.3030010-21-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent d710741 commit 7b040d4

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

drivers/scsi/snic/snic_debugfs.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ snic_stats_show(struct seq_file *sfp, void *data)
282282
jiffies_to_timespec64(stats->misc.last_ack_time, &last_ack_tms);
283283

284284
seq_printf(sfp,
285-
"Last ISR Time : %llu (%8llu.%09lu)\n"
286-
"Last Ack Time : %llu (%8llu.%09lu)\n"
285+
"Last ISR Time : %llu (%ptSp)\n"
286+
"Last Ack Time : %llu (%ptSp)\n"
287287
"Ack ISRs : %llu\n"
288288
"IO Cmpl ISRs : %llu\n"
289289
"Err Notify ISRs : %llu\n"
@@ -298,10 +298,8 @@ snic_stats_show(struct seq_file *sfp, void *data)
298298
"Queue Ramp Down : %lld\n"
299299
"Queue Last Queue Depth : %lld\n"
300300
"Target Not Ready : %lld\n",
301-
(u64) stats->misc.last_isr_time,
302-
last_isr_tms.tv_sec, last_isr_tms.tv_nsec,
303-
(u64)stats->misc.last_ack_time,
304-
last_ack_tms.tv_sec, last_ack_tms.tv_nsec,
301+
(u64) stats->misc.last_isr_time, &last_isr_tms,
302+
(u64) stats->misc.last_ack_time, &last_ack_tms,
305303
(u64) atomic64_read(&stats->misc.ack_isr_cnt),
306304
(u64) atomic64_read(&stats->misc.cmpl_isr_cnt),
307305
(u64) atomic64_read(&stats->misc.errnotify_isr_cnt),

drivers/scsi/snic/snic_trc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ snic_fmt_trc_data(struct snic_trc_data *td, char *buf, int buf_sz)
5656
jiffies_to_timespec64(td->ts, &tmspec);
5757

5858
len += snprintf(buf, buf_sz,
59-
"%llu.%09lu %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
60-
tmspec.tv_sec,
61-
tmspec.tv_nsec,
59+
"%ptSp %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
60+
&tmspec,
6261
td->fn,
6362
td->hno,
6463
td->tag,

0 commit comments

Comments
 (0)