kernel/bpf/cgroup_iter.c:336:41: warning: no previous declaration for 'bpf_iter_css_next'

From: kernel test robot
Date: Thu Nov 02 2023 - 05:44:34 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 21e80f3841c01aeaf32d7aee7bbc87b3db1aa0c6
commit: 7251d0905e7518bcb990c8e9a3615b1bb23c78f2 bpf: Introduce css open-coded iterator kfuncs
date: 13 days ago
config: i386-randconfig-141-20231102 (https://download.01.org/0day-ci/archive/20231102/202311021749.8NSp1DM4-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231102/202311021749.8NSp1DM4-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311021749.8NSp1DM4-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

kernel/bpf/cgroup_iter.c:312:17: warning: no previous declaration for 'bpf_iter_css_new' [-Wmissing-declarations]
__bpf_kfunc int bpf_iter_css_new(struct bpf_iter_css *it,
^~~~~~~~~~~~~~~~
>> kernel/bpf/cgroup_iter.c:336:41: warning: no previous declaration for 'bpf_iter_css_next' [-Wmissing-declarations]
__bpf_kfunc struct cgroup_subsys_state *bpf_iter_css_next(struct bpf_iter_css *it)
^~~~~~~~~~~~~~~~~
>> kernel/bpf/cgroup_iter.c:357:18: warning: no previous declaration for 'bpf_iter_css_destroy' [-Wmissing-declarations]
__bpf_kfunc void bpf_iter_css_destroy(struct bpf_iter_css *it)
^~~~~~~~~~~~~~~~~~~~


vim +/bpf_iter_css_next +336 kernel/bpf/cgroup_iter.c

335
> 336 __bpf_kfunc struct cgroup_subsys_state *bpf_iter_css_next(struct bpf_iter_css *it)
337 {
338 struct bpf_iter_css_kern *kit = (void *)it;
339
340 if (!kit->start)
341 return NULL;
342
343 switch (kit->flags) {
344 case BPF_CGROUP_ITER_DESCENDANTS_PRE:
345 kit->pos = css_next_descendant_pre(kit->pos, kit->start);
346 break;
347 case BPF_CGROUP_ITER_DESCENDANTS_POST:
348 kit->pos = css_next_descendant_post(kit->pos, kit->start);
349 break;
350 case BPF_CGROUP_ITER_ANCESTORS_UP:
351 kit->pos = kit->pos ? kit->pos->parent : kit->start;
352 }
353
354 return kit->pos;
355 }
356
> 357 __bpf_kfunc void bpf_iter_css_destroy(struct bpf_iter_css *it)
358 {
359 }
360

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki