From: kernel test robot <lkp@intel.com>
To: Chuyi Zhou <zhouchuyi@bytedance.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 10579/14992] kernel/bpf/task_iter.c:940:9: warning: return makes pointer from integer without a cast
Date: Thu, 26 Oct 2023 05:37:00 +0800 [thread overview]
Message-ID: <202310260528.aHWgVFqq-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fe1998aa935b44ef873193c0772c43bce74f17dc
commit: 9c66dc94b62aef23300f05f63404afb8990920b4 [10579/14992] bpf: Introduce css_task open-coded iterator kfuncs
config: i386-buildonly-randconfig-006-20231026 (https://download.01.org/0day-ci/archive/20231026/202310260528.aHWgVFqq-lkp@intel.com/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/20231026/202310260528.aHWgVFqq-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/202310260528.aHWgVFqq-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/bpf/task_iter.c:831:17: warning: no previous declaration for 'bpf_iter_task_vma_new' [-Wmissing-declarations]
__bpf_kfunc int bpf_iter_task_vma_new(struct bpf_iter_task_vma *it,
^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c:875:36: warning: no previous declaration for 'bpf_iter_task_vma_next' [-Wmissing-declarations]
__bpf_kfunc struct vm_area_struct *bpf_iter_task_vma_next(struct bpf_iter_task_vma *it)
^~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c:884:18: warning: no previous declaration for 'bpf_iter_task_vma_destroy' [-Wmissing-declarations]
__bpf_kfunc void bpf_iter_task_vma_destroy(struct bpf_iter_task_vma *it)
^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c:909:17: warning: no previous declaration for 'bpf_iter_css_task_new' [-Wmissing-declarations]
__bpf_kfunc int bpf_iter_css_task_new(struct bpf_iter_css_task *it,
^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_new':
kernel/bpf/task_iter.c:919:7: error: 'CSS_TASK_ITER_PROCS' undeclared (first use in this function); did you mean 'BPF_TASK_ITER_TGID'?
case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED:
^~~~~~~~~~~~~~~~~~~
BPF_TASK_ITER_TGID
kernel/bpf/task_iter.c:919:7: note: each undeclared identifier is reported only once for each function it appears in
kernel/bpf/task_iter.c:919:29: error: 'CSS_TASK_ITER_THREADED' undeclared (first use in this function); did you mean 'CSS_TASK_ITER_PROCS'?
case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED:
^~~~~~~~~~~~~~~~~~~~~~
CSS_TASK_ITER_PROCS
kernel/bpf/task_iter.c:927:53: error: invalid application of 'sizeof' to incomplete type 'struct css_task_iter'
kit->css_it = bpf_mem_alloc(&bpf_global_ma, sizeof(struct css_task_iter));
^~~~~~
kernel/bpf/task_iter.c:930:2: error: implicit declaration of function 'css_task_iter_start'; did you mean '__sg_page_iter_start'? [-Werror=implicit-function-declaration]
css_task_iter_start(css, flags, kit->css_it);
^~~~~~~~~~~~~~~~~~~
__sg_page_iter_start
kernel/bpf/task_iter.c: At top level:
kernel/bpf/task_iter.c:934:33: warning: no previous declaration for 'bpf_iter_css_task_next' [-Wmissing-declarations]
__bpf_kfunc struct task_struct *bpf_iter_css_task_next(struct bpf_iter_css_task *it)
^~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_next':
kernel/bpf/task_iter.c:940:9: error: implicit declaration of function 'css_task_iter_next'; did you mean '__sg_page_iter_next'? [-Werror=implicit-function-declaration]
return css_task_iter_next(kit->css_it);
^~~~~~~~~~~~~~~~~~
__sg_page_iter_next
>> kernel/bpf/task_iter.c:940:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
return css_task_iter_next(kit->css_it);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c: At top level:
kernel/bpf/task_iter.c:943:18: warning: no previous declaration for 'bpf_iter_css_task_destroy' [-Wmissing-declarations]
__bpf_kfunc void bpf_iter_css_task_destroy(struct bpf_iter_css_task *it)
^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_destroy':
kernel/bpf/task_iter.c:949:2: error: implicit declaration of function 'css_task_iter_end'; did you mean 'vma_iter_end'? [-Werror=implicit-function-declaration]
css_task_iter_end(kit->css_it);
^~~~~~~~~~~~~~~~~
vma_iter_end
cc1: some warnings being treated as errors
vim +940 kernel/bpf/task_iter.c
933
934 __bpf_kfunc struct task_struct *bpf_iter_css_task_next(struct bpf_iter_css_task *it)
935 {
936 struct bpf_iter_css_task_kern *kit = (void *)it;
937
938 if (!kit->css_it)
939 return NULL;
> 940 return css_task_iter_next(kit->css_it);
941 }
942
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-25 21:37 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=202310260528.aHWgVFqq-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zhouchuyi@bytedance.com \
/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