Re: [PATCH] bpf: init map_btf_id during compiling

From
kernel test robot <hidden>
Date
2022-04-24 11:48:54
Also in
lkml, llvm
Reply to
unknown sender, 2022-04-24
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master net-next/master net/master linus/master v5.18-rc3 next-20220422]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/menglong8-dong-gmail-com/bpf-init-map_btf_id-during-compiling/20220424-172902
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220424/202204241926.3xdM8EYM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 1cddcfdc3c683b393df1a5c9063252eb60e52818)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/a1d0d3f8a71cc20be0b95fe9506a3b3bd1b572b5
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review menglong8-dong-gmail-com/bpf-init-map_btf_id-during-compiling/20220424-172902
        git checkout a1d0d3f8a71cc20be0b95fe9506a3b3bd1b572b5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All warnings (new ones prefixed by >>):
quoted
kernel/bpf/btf.c:4823:41: warning: unused variable 'btf_vmlinux_map_ops' [-Wunused-const-variable]
   static const struct bpf_map_ops * const btf_vmlinux_map_ops[] = {
                                           ^
   1 warning generated.


vim +/btf_vmlinux_map_ops +4823 kernel/bpf/btf.c

8580ac9404f624 Alexei Starovoitov 2019-10-15  4822  
41c48f3a982317 Andrey Ignatov     2020-06-19 @4823  static const struct bpf_map_ops * const btf_vmlinux_map_ops[] = {
41c48f3a982317 Andrey Ignatov     2020-06-19  4824  #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type)
41c48f3a982317 Andrey Ignatov     2020-06-19  4825  #define BPF_LINK_TYPE(_id, _name)
41c48f3a982317 Andrey Ignatov     2020-06-19  4826  #define BPF_MAP_TYPE(_id, _ops) \
41c48f3a982317 Andrey Ignatov     2020-06-19  4827  	[_id] = &_ops,
41c48f3a982317 Andrey Ignatov     2020-06-19  4828  #include <linux/bpf_types.h>
41c48f3a982317 Andrey Ignatov     2020-06-19  4829  #undef BPF_PROG_TYPE
41c48f3a982317 Andrey Ignatov     2020-06-19  4830  #undef BPF_LINK_TYPE
41c48f3a982317 Andrey Ignatov     2020-06-19  4831  #undef BPF_MAP_TYPE
41c48f3a982317 Andrey Ignatov     2020-06-19  4832  };
41c48f3a982317 Andrey Ignatov     2020-06-19  4833  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
Thread (4 messages) 4 messages, 3 authors, last reply 2022-04-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help