mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
selftests/bpf: Fix compiler warnings in task_local_data.h
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> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20260323231133.859941-1-ameryhung@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
833ef4a954
commit
03b7b389fe
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user