Thread (38 messages) 38 messages, 12 authors, 2025-11-11

Re: [PATCH v1 04/23] libceph: Switch to use %ptSp

From: Viacheslav Dubeyko <hidden>
Date: 2025-11-10 19:19:15
Also in: amd-gfx, ceph-devel, dri-devel, intel-wired-lan, intel-xe, linux-arm-msm, linux-doc, linux-media, linux-mmc, linux-pci, linux-s390, linux-scsi, linux-sound, linux-staging, lkml, netdev

On Mon, 2025-11-10 at 19:40 +0100, Andy Shevchenko wrote:
quoted hunk ↗ jump to hunk
Use %ptSp instead of open coded variants to print content of
struct timespec64 in human readable format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 net/ceph/messenger_v2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
index 9e39378eda00..6e676e2d4ba0 100644
--- a/net/ceph/messenger_v2.c
+++ b/net/ceph/messenger_v2.c
@@ -1535,8 +1535,7 @@ static int prepare_keepalive2(struct ceph_connection *con)
 	struct timespec64 now;
 
 	ktime_get_real_ts64(&now);
-	dout("%s con %p timestamp %lld.%09ld\n", __func__, con, now.tv_sec,
-	     now.tv_nsec);
+	dout("%s con %p timestamp %ptSp\n", __func__, con, &now);
 
 	ceph_encode_timespec64(ts, &now);
 
@@ -2729,8 +2728,7 @@ static int process_keepalive2_ack(struct ceph_connection *con,
 	ceph_decode_need(&p, end, sizeof(struct ceph_timespec), bad);
 	ceph_decode_timespec64(&con->last_keepalive_ack, p);
 
-	dout("%s con %p timestamp %lld.%09ld\n", __func__, con,
-	     con->last_keepalive_ack.tv_sec, con->last_keepalive_ack.tv_nsec);
+	dout("%s con %p timestamp %ptSp\n", __func__, con, &con->last_keepalive_ack);
 
 	return 0;
 
Looks good. Nice cleanup.

Reviewed-by: Viacheslav Dubeyko <redacted>

Thanks,
Slava.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help