diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-11-13 15:32:34 +0100 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2025-11-19 12:30:11 +0100 |
| commit | 7b040d45718e8605906124f1e2c9537223b99890 (patch) | |
| tree | 885a44d212b88e67f03bd43043c3cd90f5652b87 | |
| parent | d710741f833fec1b7e9fcbf37e9b25590e65134d (diff) | |
| download | tip-7b040d45718e8605906124f1e2c9537223b99890.tar.gz | |
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>
| -rw-r--r-- | drivers/scsi/snic/snic_debugfs.c | 10 | ||||
| -rw-r--r-- | drivers/scsi/snic/snic_trc.c | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/drivers/scsi/snic/snic_debugfs.c b/drivers/scsi/snic/snic_debugfs.c index 9dd975b36b5bd5..edf3e5ef28a6d5 100644 --- a/drivers/scsi/snic/snic_debugfs.c +++ b/drivers/scsi/snic/snic_debugfs.c @@ -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), diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c index c2e5ab7e976c75..6bad1ea9a6a749 100644 --- a/drivers/scsi/snic/snic_trc.c +++ b/drivers/scsi/snic/snic_trc.c @@ -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, |
