public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [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
Date: Fri, 5 Aug 2022 04:37:11 +0800	[thread overview]
Message-ID: <202208050431.OUd5V0rj-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-08-04 20: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=202208050431.OUd5V0rj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jolsa@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@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