From: Amery Hung <ameryhung@gmail.com>
To: bpf@vger.kernel.org
Cc: alexei.starovoitov@gmail.com, andrii@kernel.org,
daniel@iogearbox.net, memxor@gmail.com, martin.lau@kernel.org,
ameryhung@gmail.com, kernel-team@meta.com
Subject: [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h
Date: Mon, 23 Mar 2026 16:11:33 -0700 [thread overview]
Message-ID: <20260323231133.859941-1-ameryhung@gmail.com> (raw)
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
next reply other threads:[~2026-03-23 23:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 23:11 Amery Hung [this message]
2026-03-24 0:04 ` [PATCH bpf-next v1 1/1] selftests/bpf: Fix compiler warnings in task_local_data.h Kumar Kartikeya Dwivedi
2026-03-24 15:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260323231133.859941-1-ameryhung@gmail.com \
--to=ameryhung@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=memxor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox