Skip to content

Commit 0cfc283

Browse files
andy-shevpmladek
authored andcommitted
ipmi: Switch to use %ptSp
Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format. Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251113150217.3030010-12-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 64acc20 commit 0cfc283

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ void debug_timestamp(struct smi_info *smi_info, char *msg)
275275
struct timespec64 t;
276276

277277
ktime_get_ts64(&t);
278-
dev_dbg(smi_info->io.dev, "**%s: %lld.%9.9ld\n",
279-
msg, t.tv_sec, t.tv_nsec);
278+
dev_dbg(smi_info->io.dev, "**%s: %ptSp\n", msg, &t);
280279
}
281280
#else
282281
#define debug_timestamp(smi_info, x)

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,8 @@ static int sender(void *send_info, struct ipmi_smi_msg *msg)
10831083
struct timespec64 t;
10841084

10851085
ktime_get_real_ts64(&t);
1086-
dev_dbg(&ssif_info->client->dev,
1087-
"**Enqueue %02x %02x: %lld.%6.6ld\n",
1088-
msg->data[0], msg->data[1],
1089-
(long long)t.tv_sec, (long)t.tv_nsec / NSEC_PER_USEC);
1086+
dev_dbg(&ssif_info->client->dev, "**Enqueue %02x %02x: %ptSp\n",
1087+
msg->data[0], msg->data[1], &t);
10901088
}
10911089
return IPMI_CC_NO_ERROR;
10921090
}

0 commit comments

Comments
 (0)