Skip to content

Commit 64acc20

Browse files
andy-shevpmladek
authored andcommitted
igb: Switch to use %ptSp
Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format. Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251113150217.3030010-11-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 81e3db7 commit 64acc20

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

drivers/net/ethernet/intel/igb/igb_ptp.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,11 @@ static void igb_ptp_overflow_check(struct work_struct *work)
840840
struct igb_adapter *igb =
841841
container_of(work, struct igb_adapter, ptp_overflow_work.work);
842842
struct timespec64 ts;
843-
u64 ns;
844843

845844
/* Update the timecounter */
846-
ns = timecounter_read(&igb->tc);
845+
ts = ns_to_timespec64(timecounter_read(&igb->tc));
847846

848-
ts = ns_to_timespec64(ns);
849-
pr_debug("igb overflow check at %lld.%09lu\n",
850-
(long long) ts.tv_sec, ts.tv_nsec);
847+
pr_debug("igb overflow check at %ptSp\n", &ts);
851848

852849
schedule_delayed_work(&igb->ptp_overflow_work,
853850
IGB_SYSTIM_OVERFLOW_PERIOD);

0 commit comments

Comments
 (0)