From: kernel test robot <lkp@intel.com>
To: Anton Protopopov <aspsk@isovalent.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Alexei Starovoitov <ast@kernel.org>
Subject: [linux-next:master 530/10518] kernel/bpf/map_iter.c:201:17: warning: no previous declaration for 'bpf_map_sum_elem_count'
Date: Thu, 17 Aug 2023 00:35:57 +0800 [thread overview]
Message-ID: <202308170007.OzhdwITj-lkp@intel.com> (raw)
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
reply other threads:[~2023-08-16 16:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308170007.OzhdwITj-lkp@intel.com \
--to=lkp@intel.com \
--cc=aspsk@isovalent.com \
--cc=ast@kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox