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>
pull/1354/merge
Andy Shevchenko 2025-11-13 15:32:34 +01:00 committed by Petr Mladek
parent d710741f83
commit 7b040d4571
2 changed files with 6 additions and 9 deletions

View File

@ -282,8 +282,8 @@ snic_stats_show(struct seq_file *sfp, void *data)
jiffies_to_timespec64(stats->misc.last_ack_time, &last_ack_tms);
seq_printf(sfp,
"Last ISR Time : %llu (%8llu.%09lu)\n"
"Last Ack Time : %llu (%8llu.%09lu)\n"
"Last ISR Time : %llu (%ptSp)\n"
"Last Ack Time : %llu (%ptSp)\n"
"Ack ISRs : %llu\n"
"IO Cmpl ISRs : %llu\n"
"Err Notify ISRs : %llu\n"
@ -298,10 +298,8 @@ snic_stats_show(struct seq_file *sfp, void *data)
"Queue Ramp Down : %lld\n"
"Queue Last Queue Depth : %lld\n"
"Target Not Ready : %lld\n",
(u64) stats->misc.last_isr_time,
last_isr_tms.tv_sec, last_isr_tms.tv_nsec,
(u64)stats->misc.last_ack_time,
last_ack_tms.tv_sec, last_ack_tms.tv_nsec,
(u64) stats->misc.last_isr_time, &last_isr_tms,
(u64) stats->misc.last_ack_time, &last_ack_tms,
(u64) atomic64_read(&stats->misc.ack_isr_cnt),
(u64) atomic64_read(&stats->misc.cmpl_isr_cnt),
(u64) atomic64_read(&stats->misc.errnotify_isr_cnt),

View File

@ -56,9 +56,8 @@ snic_fmt_trc_data(struct snic_trc_data *td, char *buf, int buf_sz)
jiffies_to_timespec64(td->ts, &tmspec);
len += snprintf(buf, buf_sz,
"%llu.%09lu %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
tmspec.tv_sec,
tmspec.tv_nsec,
"%ptSp %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n",
&tmspec,
td->fn,
td->hno,
td->tag,