public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [PATCH bpf-next v6 12/23] HID: initial BPF implementation
Date: Thu, 14 Jul 2022 22:49:42 +0800	[thread overview]
Message-ID: <202207142225.7Lu43LAS-lkp@intel.com> (raw)
In-Reply-To: <20220712145850.599666-13-benjamin.tissoires@redhat.com>

Hi Benjamin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Benjamin-Tissoires/Introduce-eBPF-support-for-HID-devices/20220712-230852
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: hexagon-randconfig-r016-20220714 (https://download.01.org/0day-ci/archive/20220714/202207142225.7Lu43LAS-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e61b9c556267086ef9b743a0b57df302eef831b)
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/57eb5074a35029f30cc13ed3a526b3342b169788
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Benjamin-Tissoires/Introduce-eBPF-support-for-HID-devices/20220712-230852
        git checkout 57eb5074a35029f30cc13ed3a526b3342b169788
        # 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=hexagon SHELL=/bin/bash drivers/hid/bpf/

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

All warnings (new ones prefixed by >>):

>> drivers/hid/bpf/hid_bpf_dispatch.c:191:12: warning: no previous prototype for function 'hid_bpf_init' [-Wmissing-prototypes]
   int __init hid_bpf_init(void)
              ^
   drivers/hid/bpf/hid_bpf_dispatch.c:191:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __init hid_bpf_init(void)
   ^
   static 
>> drivers/hid/bpf/hid_bpf_dispatch.c:224:13: warning: no previous prototype for function 'hid_bpf_exit' [-Wmissing-prototypes]
   void __exit hid_bpf_exit(void)
               ^
   drivers/hid/bpf/hid_bpf_dispatch.c:224:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __exit hid_bpf_exit(void)
   ^
   static 
   2 warnings generated.
--
>> drivers/hid/bpf/hid_bpf_jmp_table.c:100:21: warning: no previous prototype for function '__hid_bpf_tail_call' [-Wmissing-prototypes]
   __weak noinline int __hid_bpf_tail_call(struct hid_bpf_ctx *ctx)
                       ^
   drivers/hid/bpf/hid_bpf_jmp_table.c:100:17: note: declare 'static' if the function is not intended to be used outside of this translation unit
   __weak noinline int __hid_bpf_tail_call(struct hid_bpf_ctx *ctx)
                   ^
                   static 
   1 warning generated.


vim +/hid_bpf_init +191 drivers/hid/bpf/hid_bpf_dispatch.c

   190	
 > 191	int __init hid_bpf_init(void)
   192	{
   193		int err;
   194	
   195		/* Note: if we exit with an error any time here, we would entirely break HID, which
   196		 * is probably not something we want. So we log an error and return success.
   197		 *
   198		 * This is not a big deal: the syscall allowing to attach a BPF program to a HID device
   199		 * will not be available, so nobody will be able to use the functionality.
   200		 */
   201	
   202		err = register_btf_kfunc_id_set(BPF_PROG_TYPE_TRACING, &hid_bpf_kfunc_set);
   203		if (err) {
   204			pr_warn("error while setting HID BPF tracing kfuncs: %d", err);
   205			return 0;
   206		}
   207	
   208		err = hid_bpf_preload_skel();
   209		if (err) {
   210			pr_warn("error while preloading HID BPF dispatcher: %d", err);
   211			return 0;
   212		}
   213	
   214		/* register syscalls after we are sure we can load our preloaded bpf program */
   215		err = register_btf_kfunc_id_set(BPF_PROG_TYPE_SYSCALL, &hid_bpf_syscall_kfunc_set);
   216		if (err) {
   217			pr_warn("error while setting HID BPF syscall kfuncs: %d", err);
   218			return 0;
   219		}
   220	
   221		return 0;
   222	}
   223	
 > 224	void __exit hid_bpf_exit(void)
   225	{
   226		/* HID depends on us, so if we hit that code, we are guaranteed that hid
   227		 * has been removed and thus we do not need to clear the HID devices
   228		 */
   229		hid_bpf_free_links_and_skel();
   230	}
   231	

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

       reply	other threads:[~2022-07-14 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220712145850.599666-13-benjamin.tissoires@redhat.com>
2022-07-14 14:49 ` kernel test robot [this message]
2022-07-14 16:42 ` [PATCH bpf-next v6 12/23] HID: initial BPF implementation kernel test robot
2022-07-15  9:28   ` Benjamin Tissoires

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=202207142225.7Lu43LAS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=kbuild-all@lists.01.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