Skip to contentSkip to conversation

net/mptcp/bpf.c:218:47: error: 'bpf_mptcp_sched_ops' undeclared; did you mean 'mptcp_sched_ops'?

PATCH kernel test robot 1 participant 1 message Jan 31, 2024 Networking MPTCP

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://github.com/multipath-tcp/mptcp_net-next.git export
head:   198dcdf0bf0b194a21bd413dc050d08b21e48cc1
commit: e76812a9ec49b57af8ee86420f994899d754d53d [32/49] bpf: Add bpf_mptcp_sched_ops
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240131/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from net/mptcp/bpf.c:12:
net/mptcp/bpf.c: In function 'bpf_mptcp_kfunc_init':

>> net/mptcp/bpf.c:218:47: error: 'bpf_mptcp_sched_ops' undeclared (first use in this function); did you mean 'mptcp_sched_ops'?
     218 |         ret = ret ?: register_bpf_struct_ops(&bpf_mptcp_sched_ops, mptcp_sched_ops);
         |                                               ^~~~~~~~~~~~~~~~~~~
   include/linux/bpf.h:1794:59: note: in definition of macro 'register_bpf_struct_ops'
    1794 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
         |                                                           ^~~~~~
   net/mptcp/bpf.c:218:47: note: each undeclared identifier is reported only once for each function it appears in
     218 |         ret = ret ?: register_bpf_struct_ops(&bpf_mptcp_sched_ops, mptcp_sched_ops);
         |                                               ^~~~~~~~~~~~~~~~~~~
   include/linux/bpf.h:1794:59: note: in definition of macro 'register_bpf_struct_ops'
    1794 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
         |                                                           ^~~~~~

vim +218 net/mptcp/bpf.c

212
213 static int __init bpf_mptcp_kfunc_init(void)
214 {
215 int ret;
216
217 ret = register_btf_fmodret_id_set(&bpf_mptcp_fmodret_set);

 > 218		ret = ret ?: register_bpf_struct_ops(&bpf_mptcp_sched_ops, mptcp_sched_ops);
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki