Skip to content

Commit b8edf4f

Browse files
andy-shevpmladek
authored andcommitted
net: dsa: sja1105: 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> Acked-by: Vladimir Oltean <olteanv@gmail.com> Tested-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/20251113150217.3030010-15-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 12158d6 commit b8edf4f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

drivers/net/dsa/sja1105/sja1105_tas.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,8 @@ static void sja1105_tas_state_machine(struct work_struct *work)
775775
base_time_ts = ns_to_timespec64(base_time);
776776
now_ts = ns_to_timespec64(now);
777777

778-
dev_dbg(ds->dev, "OPER base time %lld.%09ld (now %lld.%09ld)\n",
779-
base_time_ts.tv_sec, base_time_ts.tv_nsec,
780-
now_ts.tv_sec, now_ts.tv_nsec);
778+
dev_dbg(ds->dev, "OPER base time %ptSp (now %ptSp)\n",
779+
&base_time_ts, &now_ts);
781780

782781
break;
783782

@@ -798,8 +797,7 @@ static void sja1105_tas_state_machine(struct work_struct *work)
798797
if (now < tas_data->oper_base_time) {
799798
/* TAS has not started yet */
800799
diff = ns_to_timespec64(tas_data->oper_base_time - now);
801-
dev_dbg(ds->dev, "time to start: [%lld.%09ld]",
802-
diff.tv_sec, diff.tv_nsec);
800+
dev_dbg(ds->dev, "time to start: [%ptSp]", &diff);
803801
break;
804802
}
805803

0 commit comments

Comments
 (0)