All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jolsa-perf:kprobe/multi 8/13] kernel/bpf/syscall.c:3099:32: warning: initialization of 'struct kretprobe *' from 'int' makes pointer from integer without a cast
Date: Tue, 28 Dec 2021 00:57:06 +0800	[thread overview]
Message-ID: <202112280010.ufkJQV03-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3016 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head:   bc59262730d5cfc95d6cae84f247d2e8690a309b
commit: 9308a22da930865f9cc80a47f3d0ced38aae1a0a [8/13] bpf: Add kprobe link for attaching raw kprobes
config: nds32-randconfig-r032-20211227 (https://download.01.org/0day-ci/archive/20211228/202112280010.ufkJQV03-lkp(a)intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=9308a22da930865f9cc80a47f3d0ced38aae1a0a
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf kprobe/multi
        git checkout 9308a22da930865f9cc80a47f3d0ced38aae1a0a
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/bpf/

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

All warnings (new ones prefixed by >>):

   kernel/bpf/syscall.c: In function 'bpf_perf_link_attach':
   kernel/bpf/syscall.c:3021:17: error: 'ENOTSUP' undeclared (first use in this function); did you mean 'ENOTSUPP'?
    3021 |         return -ENOTSUP;
         |                 ^~~~~~~
         |                 ENOTSUPP
   kernel/bpf/syscall.c:3021:17: note: each undeclared identifier is reported only once for each function it appears in
   kernel/bpf/syscall.c: In function 'kretprobe_dispatcher':
   kernel/bpf/syscall.c:3099:32: error: implicit declaration of function 'get_kretprobe'; did you mean 'get_kprobe'? [-Werror=implicit-function-declaration]
    3099 |         struct kretprobe *rp = get_kretprobe(ri);
         |                                ^~~~~~~~~~~~~
         |                                get_kprobe
>> kernel/bpf/syscall.c:3099:32: warning: initialization of 'struct kretprobe *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   kernel/bpf/syscall.c: In function 'bpf_perf_link_attach':
   kernel/bpf/syscall.c:3022:1: error: control reaches end of non-void function [-Werror=return-type]
    3022 | }
         | ^
   cc1: some warnings being treated as errors


vim +3099 kernel/bpf/syscall.c

  3095	
  3096	static int
  3097	kretprobe_dispatcher(struct kretprobe_instance *ri, struct pt_regs *regs)
  3098	{
> 3099		struct kretprobe *rp = get_kretprobe(ri);
  3100		struct bpf_kprobe_link *kprobe_link;
  3101	
  3102		kprobe_link = container_of(rp, struct bpf_kprobe_link, rp);
  3103		return kprobe_link_prog_run(kprobe_link, regs);
  3104	}
  3105	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [jolsa-perf:kprobe/multi 8/13] kernel/bpf/syscall.c:3099:32: warning: initialization of 'struct kretprobe *' from 'int' makes pointer from integer without a cast
Date: Tue, 28 Dec 2021 00:57:06 +0800	[thread overview]
Message-ID: <202112280010.ufkJQV03-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head:   bc59262730d5cfc95d6cae84f247d2e8690a309b
commit: 9308a22da930865f9cc80a47f3d0ced38aae1a0a [8/13] bpf: Add kprobe link for attaching raw kprobes
config: nds32-randconfig-r032-20211227 (https://download.01.org/0day-ci/archive/20211228/202112280010.ufkJQV03-lkp@intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=9308a22da930865f9cc80a47f3d0ced38aae1a0a
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf kprobe/multi
        git checkout 9308a22da930865f9cc80a47f3d0ced38aae1a0a
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/bpf/

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

All warnings (new ones prefixed by >>):

   kernel/bpf/syscall.c: In function 'bpf_perf_link_attach':
   kernel/bpf/syscall.c:3021:17: error: 'ENOTSUP' undeclared (first use in this function); did you mean 'ENOTSUPP'?
    3021 |         return -ENOTSUP;
         |                 ^~~~~~~
         |                 ENOTSUPP
   kernel/bpf/syscall.c:3021:17: note: each undeclared identifier is reported only once for each function it appears in
   kernel/bpf/syscall.c: In function 'kretprobe_dispatcher':
   kernel/bpf/syscall.c:3099:32: error: implicit declaration of function 'get_kretprobe'; did you mean 'get_kprobe'? [-Werror=implicit-function-declaration]
    3099 |         struct kretprobe *rp = get_kretprobe(ri);
         |                                ^~~~~~~~~~~~~
         |                                get_kprobe
>> kernel/bpf/syscall.c:3099:32: warning: initialization of 'struct kretprobe *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   kernel/bpf/syscall.c: In function 'bpf_perf_link_attach':
   kernel/bpf/syscall.c:3022:1: error: control reaches end of non-void function [-Werror=return-type]
    3022 | }
         | ^
   cc1: some warnings being treated as errors


vim +3099 kernel/bpf/syscall.c

  3095	
  3096	static int
  3097	kretprobe_dispatcher(struct kretprobe_instance *ri, struct pt_regs *regs)
  3098	{
> 3099		struct kretprobe *rp = get_kretprobe(ri);
  3100		struct bpf_kprobe_link *kprobe_link;
  3101	
  3102		kprobe_link = container_of(rp, struct bpf_kprobe_link, rp);
  3103		return kprobe_link_prog_run(kprobe_link, regs);
  3104	}
  3105	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

             reply	other threads:[~2021-12-27 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 16:57 kernel test robot [this message]
2021-12-27 16:57 ` [jolsa-perf:kprobe/multi 8/13] kernel/bpf/syscall.c:3099:32: warning: initialization of 'struct kretprobe *' from 'int' makes pointer from integer without a cast kernel test robot

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=202112280010.ufkJQV03-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 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.