* [mingo-tip:sched/headers 1662/2356] include/linux/bpf-cgroup-api.h:99:17: warning: incompatible integer to pointer conversion initializing 'struct cgroup *' with an expression of type 'int'
@ 2022-04-19 3:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-19 3:26 UTC (permalink / raw)
To: Ingo Molnar; +Cc: llvm, kbuild-all, linux-kernel
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: af93551cf39027d176f30b9beafc60a4c130998a
commit: 946f6b0a519a1210d974a40c8400726c341e0bd6 [1662/2356] headers/deps: cgroup: Split <linux/bpf-cgroup.h> into <linux/bpf-cgroup-types.h> and <linux/bpf-cgroup-api.h>
config: x86_64-randconfig-a013-20220418 (https://download.01.org/0day-ci/archive/20220419/202204191109.jMo5t4hA-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
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/mingo/tip.git/commit/?id=946f6b0a519a1210d974a40c8400726c341e0bd6
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 946f6b0a519a1210d974a40c8400726c341e0bd6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/bpf/ mm/ net/ipv4/ sound/soc/codecs/
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 >>):
In file included from kernel/bpf/cgroup.c:17:
include/linux/bpf-cgroup-api.h:99:24: error: implicit declaration of function 'sock_cgroup_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
^
>> include/linux/bpf-cgroup-api.h:99:17: warning: incompatible integer to pointer conversion initializing 'struct cgroup *' with an expression of type 'int' [-Wint-conversion]
struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/cgroup.c:31:
In file included from kernel/bpf/../cgroup/cgroup-internal.h:7:
include/linux/cgroup_api.h:875:30: error: static declaration of 'sock_cgroup_ptr' follows non-static declaration
static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
^
include/linux/bpf-cgroup-api.h:99:24: note: previous implicit declaration is here
struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
^
1 warning and 2 errors generated.
--
In file included from net/ipv4/udp.c:103:
include/linux/bpf-cgroup-api.h:99:24: error: implicit declaration of function 'sock_cgroup_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
^
>> include/linux/bpf-cgroup-api.h:99:17: warning: incompatible integer to pointer conversion initializing 'struct cgroup *' with an expression of type 'int' [-Wint-conversion]
struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +99 include/linux/bpf-cgroup-api.h
90
91 int bpf_percpu_cgroup_storage_copy(struct bpf_map *map, void *key, void *value);
92 int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key,
93 void *value, u64 flags);
94
95 /* Opportunistic check to see whether we have any BPF program attached*/
96 static inline bool cgroup_bpf_sock_enabled(struct sock *sk,
97 enum cgroup_bpf_attach_type type)
98 {
> 99 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
100 struct bpf_prog_array *array;
101
102 array = rcu_access_pointer(cgrp->bpf.effective[type]);
103 return array != &bpf_empty_prog_array.hdr;
104 }
105
--
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-04-19 3:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-19 3:26 [mingo-tip:sched/headers 1662/2356] include/linux/bpf-cgroup-api.h:99:17: warning: incompatible integer to pointer conversion initializing 'struct cgroup *' with an expression of type 'int' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).