public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] samples/bpf:Fix the wrong format specifier
@ 2024-08-20  8:10 Zhu Jun
  2024-08-21 20:48 ` Yonghong Song
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2024-08-20  8:10 UTC (permalink / raw)
  To: martin.lau
  Cc: eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
	haoluo, linux-kernel, zhujun2

The format specifier of "int" in printf() should be "%d", not
"%u"

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 samples/bpf/map_perf_test_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c
index 07ff471ed6ae..dc27057c7dc1 100644
--- a/samples/bpf/map_perf_test_user.c
+++ b/samples/bpf/map_perf_test_user.c
@@ -159,7 +159,7 @@ static void do_test_lru(enum test_type test, int cpu)
 					  &inner_lru_map_fds[cpu],
 					  BPF_ANY);
 		if (ret) {
-			printf("cannot update ARRAY_OF_LRU_HASHS with key:%u. %s(%d)\n",
+			printf("cannot update ARRAY_OF_LRU_HASHS with key:%d. %s(%d)\n",
 			       cpu, strerror(errno), errno);
 			exit(1);
 		}
-- 
2.17.1




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

* Re: [PATCH] samples/bpf:Fix the wrong format specifier
  2024-08-20  8:10 [PATCH] samples/bpf:Fix the wrong format specifier Zhu Jun
@ 2024-08-21 20:48 ` Yonghong Song
  0 siblings, 0 replies; 2+ messages in thread
From: Yonghong Song @ 2024-08-21 20:48 UTC (permalink / raw)
  To: Zhu Jun, martin.lau
  Cc: eddyz87, song, john.fastabend, kpsingh, sdf, haoluo, linux-kernel


On 8/20/24 1:10 AM, Zhu Jun wrote:
> The format specifier of "int" in printf() should be "%d", not
> "%u"
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>


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

end of thread, other threads:[~2024-08-21 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  8:10 [PATCH] samples/bpf:Fix the wrong format specifier Zhu Jun
2024-08-21 20:48 ` Yonghong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox