All of lore.kernel.org
 help / color / mirror / Atom feed
* [jolsa-perf:bpf/tracing_multi 11/18] kernel/bpf/trampoline.c:259:6: error: call to undeclared function 'key_in_multi_trampoline'; ISO C99 and later do not support implicit function declarations
@ 2022-08-04 20:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-04 20:37 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tracing_multi
head:   3f77a2c51293ea19f1ce6a9b06b9fa394beecd13
commit: fb3e0f80af089fc89a36ad479f7adfc4dd3aa9fb [11/18] bpf: Add support to attach program to multiple trampolines
config: riscv-randconfig-r042-20220804 (https://download.01.org/0day-ci/archive/20220805/202208050431.OUd5V0rj-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 26dd42705c2af0b8f6e5d6cdb32c9bd5ed9524eb)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=fb3e0f80af089fc89a36ad479f7adfc4dd3aa9fb
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf bpf/tracing_multi
        git checkout fb3e0f80af089fc89a36ad479f7adfc4dd3aa9fb
        # 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=riscv SHELL=/bin/bash kernel/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/bpf/trampoline.c:259:6: error: call to undeclared function 'key_in_multi_trampoline'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (key_in_multi_trampoline(key))
               ^
>> kernel/bpf/trampoline.c:1056:13: error: static declaration of 'key_in_multi_trampoline' follows non-static declaration
   static bool key_in_multi_trampoline(u64 key)
               ^
   kernel/bpf/trampoline.c:259:6: note: previous implicit declaration is here
           if (key_in_multi_trampoline(key))
               ^
   kernel/bpf/trampoline.c:1099:9: warning: variable 'rollback_cnt' set but not used [-Wunused-but-set-variable]
           int i, rollback_cnt = 0, err = -EINVAL;
                  ^
   kernel/bpf/trampoline.c:1100:16: warning: variable 'ip' set but not used [-Wunused-but-set-variable]
           unsigned long ip, image_new, image_old;
                         ^
   2 warnings and 2 errors generated.


vim +/key_in_multi_trampoline +259 kernel/bpf/trampoline.c

   252	
   253	static struct bpf_trampoline *bpf_trampoline_lookup(u64 key)
   254	{
   255		struct bpf_trampoline *tr = NULL;
   256		struct hlist_head *head;
   257	
   258		mutex_lock(&trampoline_mutex);
 > 259		if (key_in_multi_trampoline(key))
   260			goto out;
   261		tr = __bpf_trampoline_lookup(key);
   262		if (tr) {
   263			refcount_inc(&tr->refcnt);
   264			goto out;
   265		}
   266		tr = bpf_trampoline_alloc();
   267		if (!tr)
   268			goto out;
   269		tr->key = key;
   270		head = &trampoline_table[hash_64(key, TRAMPOLINE_HASH_BITS)];
   271		hlist_add_head(&tr->hlist, head);
   272	out:
   273		mutex_unlock(&trampoline_mutex);
   274		return tr;
   275	}
   276	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-04 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 20:37 [jolsa-perf:bpf/tracing_multi 11/18] kernel/bpf/trampoline.c:259:6: error: call to undeclared function 'key_in_multi_trampoline'; ISO C99 and later do not support implicit function declarations kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.