* [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h
@ 2026-03-23 23:11 Amery Hung
2026-03-24 0:04 ` Kumar Kartikeya Dwivedi
2026-03-24 15:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Amery Hung @ 2026-03-23 23:11 UTC (permalink / raw)
To: bpf
Cc: alexei.starovoitov, andrii, daniel, memxor, martin.lau, ameryhung,
kernel-team
Fix compiler warnings about unused parameter, narrowing non-constant
into a smaller type and comparison between integers of different size.
Signed-off-by: Amery Hung <ameryhung@gmail.com>
---
tools/testing/selftests/bpf/prog_tests/task_local_data.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/task_local_data.h b/tools/testing/selftests/bpf/prog_tests/task_local_data.h
index 95847088961a..7819f318b2fb 100644
--- a/tools/testing/selftests/bpf/prog_tests/task_local_data.h
+++ b/tools/testing/selftests/bpf/prog_tests/task_local_data.h
@@ -120,6 +120,7 @@ static void tld_free(void);
static void __tld_thread_exit_handler(void *unused)
{
+ (void)unused;
tld_free();
}
#endif
@@ -222,10 +223,10 @@ static tld_key_t __tld_create_key(const char *name, size_t size, bool dyn_data)
if (!TLD_READ_ONCE(tld_meta_p)) {
err = __tld_init_meta_p();
if (err)
- return (tld_key_t){err};
+ return (tld_key_t){(__s16)err};
}
- for (i = 0; i < TLD_MAX_DATA_CNT; i++) {
+ for (i = 0; i < (int)TLD_MAX_DATA_CNT; i++) {
retry:
cnt = atomic_load(&tld_meta_p->cnt);
if (i < cnt) {
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h
2026-03-23 23:11 [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h Amery Hung
@ 2026-03-24 0:04 ` Kumar Kartikeya Dwivedi
2026-03-24 15:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-03-24 0:04 UTC (permalink / raw)
To: Amery Hung
Cc: bpf, alexei.starovoitov, andrii, daniel, martin.lau, kernel-team
On Tue, 24 Mar 2026 at 00:11, Amery Hung <ameryhung@gmail.com> wrote:
>
> Fix compiler warnings about unused parameter, narrowing non-constant
> into a smaller type and comparison between integers of different size.
Nit: might be worth noting it's supposed to fix compilation in C++.
>
> Signed-off-by: Amery Hung <ameryhung@gmail.com>
> ---
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> [...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h
2026-03-23 23:11 [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h Amery Hung
2026-03-24 0:04 ` Kumar Kartikeya Dwivedi
@ 2026-03-24 15:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-24 15:50 UTC (permalink / raw)
To: Amery Hung
Cc: bpf, alexei.starovoitov, andrii, daniel, memxor, martin.lau,
kernel-team
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Mon, 23 Mar 2026 16:11:33 -0700 you wrote:
> Fix compiler warnings about unused parameter, narrowing non-constant
> into a smaller type and comparison between integers of different size.
>
> Signed-off-by: Amery Hung <ameryhung@gmail.com>
> ---
> tools/testing/selftests/bpf/prog_tests/task_local_data.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Here is the summary with links:
- [bpf-next,v1,1/1] selftests/bpf: Fix compiler warnings in task_local_data.h
https://git.kernel.org/bpf/bpf-next/c/03b7b389fe88
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-24 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 23:11 [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h Amery Hung
2026-03-24 0:04 ` Kumar Kartikeya Dwivedi
2026-03-24 15:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox