netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rdma: Fix res_print_uint()
@ 2022-03-02  3:06 Shangyan Zhou
  2022-03-03 18:44 ` Leon Romanovsky
  2022-03-04  3:00 ` [PATCH v2] " Shangyan Zhou
  0 siblings, 2 replies; 11+ messages in thread
From: Shangyan Zhou @ 2022-03-02  3:06 UTC (permalink / raw)
  To: netdev; +Cc: Shangyan Zhou

Print unsigned int should use "%u" instead of "%d"

Signed-off-by: Shangyan Zhou <sy.zhou@hotmail.com>
---
 rdma/res.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rdma/res.c b/rdma/res.c
index 21fef9bd..832b795d 100644
--- a/rdma/res.c
+++ b/rdma/res.c
@@ -214,7 +214,7 @@ void res_print_uint(struct rd *rd, const char *name, uint64_t val,
 	if (!nlattr)
 		return;
 	print_color_uint(PRINT_ANY, COLOR_NONE, name, name, val);
-	print_color_uint(PRINT_FP, COLOR_NONE, NULL, " %d ", val);
+	print_color_uint(PRINT_FP, COLOR_NONE, NULL, " %u ", val);
 }
 
 RES_FUNC(res_no_args,	RDMA_NLDEV_CMD_RES_GET,	NULL, true, 0);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-07 12:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-02  3:06 [PATCH] rdma: Fix res_print_uint() Shangyan Zhou
2022-03-03 18:44 ` Leon Romanovsky
2022-03-04  3:17   ` Shangyan Zhou
2022-03-04  3:00 ` [PATCH v2] " Shangyan Zhou
2022-03-04  7:02   ` Leon Romanovsky
2022-03-04 12:47     ` Shangyan Zhou
2022-03-04 12:46   ` [PATCH v3] rdma: Fix res_print_uint() and add res_print_u64() Shangyan Zhou
2022-03-04 17:33     ` Leon Romanovsky
2022-03-06  7:00       ` Shangyan Zhou
2022-03-06  6:56     ` [PATCH v4] rdma: Fix the logic to print unsigned int Shangyan Zhou
2022-03-07 12:49       ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).