diff mbox

[20/28] verbs: Use inttypes.h format string macros

Message ID 1473109698-31408-21-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Superseded
Headers show

Commit Message

Jason Gunthorpe Sept. 5, 2016, 9:08 p.m. UTC
Otherwise a 32bit compile of ibv_devinfo will print garbage for
these values.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 libibverbs/examples/devinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
index c49765046965..2b673c854860 100644
--- a/libibverbs/examples/devinfo.c
+++ b/libibverbs/examples/devinfo.c
@@ -452,13 +452,13 @@  static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port)
 
 		print_odp_caps(&device_attr.odp_caps);
 		if (device_attr.completion_timestamp_mask)
-			printf("\tcompletion timestamp_mask:\t\t\t0x%016lx\n",
+			printf("\tcompletion timestamp_mask:\t\t\t0x%016" PRIx64 "\n",
 			       device_attr.completion_timestamp_mask);
 		else
 			printf("\tcompletion_timestamp_mask not supported\n");
 
 		if (device_attr.hca_core_clock)
-			printf("\thca_core_clock:\t\t\t%lukHZ\n", device_attr.hca_core_clock);
+			printf("\thca_core_clock:\t\t\t%" PRIu64 "kHZ\n", device_attr.hca_core_clock);
 		else
 			printf("\tcore clock not supported\n");