[kkdwivedi:atype 7/45] kernel/bpf/cgroup.c:2546:23: warning: unused variable 'atype'
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/kkdwivedi/linux atype head: 5df289d7c4d635b11dcb0189c0ccd05c28d743c4 commit: 3dc38bbc8129a334d0172e7e3eaf878f8d76aa56 [7/45] bpf: Resolve freplace types in callback and fixup paths config: arm-randconfig-004-20260810 (https://download.01.org/0day-ci/archive/20260810/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260810/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> kernel/bpf/cgroup.c:2546:23: warning: unused variable 'atype' [-Wunused-variable] 2546 | enum bpf_attach_type atype = resolve_attach_type(prog); | ^~~~~ 1 warning generated. vim +/atype +2546 kernel/bpf/cgroup.c 2541 2542 static const struct bpf_func_proto * 2543 cg_sockopt_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) 2544 { 2545 const struct bpf_func_proto *func_proto; > 2546 enum bpf_attach_type atype = resolve_attach_type(prog); 2547 2548 func_proto = cgroup_common_func_proto(func_id, prog); 2549 if (func_proto) 2550 return func_proto; 2551 2552 switch (func_id) { 2553 #ifdef CONFIG_NET 2554 case BPF_FUNC_get_netns_cookie: 2555 return &bpf_get_netns_cookie_sockopt_proto; 2556 case BPF_FUNC_sk_storage_get: 2557 return &bpf_sk_storage_get_proto; 2558 case BPF_FUNC_sk_storage_delete: 2559 return &bpf_sk_storage_delete_proto; 2560 case BPF_FUNC_setsockopt: 2561 if (atype == BPF_CGROUP_SETSOCKOPT) 2562 return &bpf_sk_setsockopt_proto; 2563 return NULL; 2564 case BPF_FUNC_getsockopt: 2565 if (atype == BPF_CGROUP_SETSOCKOPT) 2566 return &bpf_sk_getsockopt_proto; 2567 return NULL; 2568 #endif 2569 #ifdef CONFIG_INET 2570 case BPF_FUNC_tcp_sock: 2571 return &bpf_tcp_sock_proto; 2572 #endif 2573 case BPF_FUNC_perf_event_output: 2574 return &bpf_event_output_data_proto; 2575 default: 2576 return bpf_base_func_proto(func_id, prog); 2577 } 2578 } 2579 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki