* [linux-next:master 530/10518] kernel/bpf/map_iter.c:201:17: warning: no previous declaration for 'bpf_map_sum_elem_count'
@ 2023-08-16 16:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-16 16:35 UTC (permalink / raw)
To: Anton Protopopov
Cc: oe-kbuild-all, Linux Memory Management List, Alexei Starovoitov
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ef66bf8aeb91fd331cf8f5dca8f9d7bca9ab2849
commit: 803370d3d37579e080e8c59f2360a072d0e45aff [530/10518] bpf: add a new kfunc to return current bpf_map elements count
config: x86_64-randconfig-r032-20230816 (https://download.01.org/0day-ci/archive/20230817/202308170007.OzhdwITj-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20230817/202308170007.OzhdwITj-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/202308170007.OzhdwITj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/map_iter.c:201:17: warning: no previous declaration for 'bpf_map_sum_elem_count' [-Wmissing-declarations]
__bpf_kfunc s64 bpf_map_sum_elem_count(struct bpf_map *map)
^~~~~~~~~~~~~~~~~~~~~~
vim +/bpf_map_sum_elem_count +201 kernel/bpf/map_iter.c
196
197 __diag_push();
198 __diag_ignore_all("-Wmissing-prototypes",
199 "Global functions as their definitions will be in vmlinux BTF");
200
> 201 __bpf_kfunc s64 bpf_map_sum_elem_count(struct bpf_map *map)
202 {
203 s64 *pcount;
204 s64 ret = 0;
205 int cpu;
206
207 if (!map || !map->elem_count)
208 return 0;
209
210 for_each_possible_cpu(cpu) {
211 pcount = per_cpu_ptr(map->elem_count, cpu);
212 ret += READ_ONCE(*pcount);
213 }
214 return ret;
215 }
216
--
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:[~2023-08-16 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 16:35 [linux-next:master 530/10518] kernel/bpf/map_iter.c:201:17: warning: no previous declaration for 'bpf_map_sum_elem_count' 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