Skip to content

Commit b1e7286

Browse files
andy-shevpmladek
authored andcommitted
pps: Switch to use %ptSp
Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format. Acked-by: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251113150217.3030010-17-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 3bc02fe commit b1e7286

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/pps/generators/pps_gen_parport.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ static enum hrtimer_restart hrtimer_event(struct hrtimer *timer)
8080
/* check if we are late */
8181
if (expire_time.tv_sec != ts1.tv_sec || ts1.tv_nsec > lim) {
8282
local_irq_restore(flags);
83-
pr_err("we are late this time %lld.%09ld\n",
84-
(s64)ts1.tv_sec, ts1.tv_nsec);
83+
pr_err("we are late this time %ptSp\n", &ts1);
8584
goto done;
8685
}
8786

drivers/pps/kapi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
166166
/* check event type */
167167
BUG_ON((event & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR)) == 0);
168168

169-
dev_dbg(&pps->dev, "PPS event at %lld.%09ld\n",
170-
(s64)ts->ts_real.tv_sec, ts->ts_real.tv_nsec);
169+
dev_dbg(&pps->dev, "PPS event at %ptSp\n", &ts->ts_real);
171170

172171
timespec_to_pps_ktime(&ts_real, ts->ts_real);
173172

0 commit comments

Comments
 (0)