kernel/bpf/cgroup.c:412:9: error: call to undeclared function 'bpf_struct_ops_id'; ISO C99 and later do not support implicit function declarations
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/intel-lab-lkp/linux/commits/Amery-Hung/bpf-Remove-__rcu-tagging-in-st_link-map/20260813-181925 head: 770f00a7e2903fc692a7fbf06430c2f04d192b6f commit: 66846cc6e671612661560603b60b552003b460d7 bpf: Add infrastructure to support attaching struct_ops to cgroups date: 3 days ago config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260816/[email protected]/config) compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/[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 errors (new ones prefixed by >>): >> kernel/bpf/cgroup.c:412:9: error: call to undeclared function 'bpf_struct_ops_id'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 412 | id = bpf_struct_ops_id(item->kdata); | ^ kernel/bpf/cgroup.c:412:9: note: did you mean 'bpf_struct_ops_find'? include/linux/btf.h:540:49: note: 'bpf_struct_ops_find' declared here 540 | static inline const struct bpf_struct_ops_desc *bpf_struct_ops_find(struct btf *btf, u32 type_id) | ^ 1 error generated. vim +/bpf_struct_ops_id +412 kernel/bpf/cgroup.c 398 399 static int bpf_cgroup_array_copy_to_user(struct bpf_prog_array *array, 400 __u32 __user *prog_ids, int cnt, 401 enum cgroup_bpf_attach_type atype) 402 { 403 struct bpf_prog_array_item *item; 404 int i = 0; 405 u32 id; 406 407 for (item = array->items; item->prog && i < cnt; item++) { 408 if (item->prog == bpf_cgroup_array_dummy(atype)) 409 continue; 410 411 if (cgroup_bpf_is_struct_ops_atype(atype)) > 412 id = bpf_struct_ops_id(item->kdata); 413 else 414 id = item->prog->aux->id; 415 416 if (copy_to_user(prog_ids + i, &id, sizeof(id))) 417 return -EFAULT; 418 i++; 419 } 420 return item->prog ? -ENOSPC : 0; 421 } 422 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki