Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* 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
@ 2026-08-16  4:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-16  4:39 UTC (permalink / raw)
  To: Martin KaFai Lau; +Cc: llvm, oe-kbuild-all, 0day robot, Amery Hung

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/202608160659.fOw8zOgX-lkp@intel.com/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/202608160659.fOw8zOgX-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608160659.fOw8zOgX-lkp@intel.com/

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-16  4:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16  4:39 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox