[congwang:sch_bpf2 2/2] kernel/bpf/btf.c:4422:9: error: initialized field overwritten
by kernel test robot
tree: https://github.com/congwang/linux.git sch_bpf2
head: 605f886c8f746c2b592e404357408911e7e05ee6
commit: 605f886c8f746c2b592e404357408911e7e05ee6 [2/2] net_sched: introduce eBPF based Qdisc
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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://github.com/congwang/linux/commit/605f886c8f746c2b592e404357408911...
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sch_bpf2
git checkout 605f886c8f746c2b592e404357408911e7e05ee6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/bpf/btf.c:4422:9: error: initialized field overwritten [-Werror=override-init]
4422 | 0, /* avoid empty array */
| ^
kernel/bpf/btf.c:4422:9: note: (near initialization for 'bpf_ctx_convert_map[32]')
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5748:29: error: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5748 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5785:9: error: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5785 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
cc1: all warnings being treated as errors
vim +4422 kernel/bpf/btf.c
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4396
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4397 #define BPF_MAP_TYPE(_id, _ops)
f2e10bff16a0fd Andrii Nakryiko 2020-04-28 4398 #define BPF_LINK_TYPE(_id, _name)
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4399 static union {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4400 struct bpf_ctx_convert {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4401 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4402 prog_ctx_type _id##_prog; \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4403 kern_ctx_type _id##_kern;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4404 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4405 #undef BPF_PROG_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4406 } *__t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4407 /* 't' is written once under lock. Read many times. */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4408 const struct btf_type *t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4409 } bpf_ctx_convert;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4410 enum {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4411 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4412 __ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4413 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4414 #undef BPF_PROG_TYPE
ce27709b8162e5 Alexei Starovoitov 2019-11-27 4415 __ctx_convert_unused, /* to avoid empty enum in extreme .config */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4416 };
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4417 static u8 bpf_ctx_convert_map[] = {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4418 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4419 [_id] = __ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4420 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4421 #undef BPF_PROG_TYPE
4c80c7bc583a87 Arnd Bergmann 2019-12-10 @4422 0, /* avoid empty array */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4423 };
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4424 #undef BPF_MAP_TYPE
f2e10bff16a0fd Andrii Nakryiko 2020-04-28 4425 #undef BPF_LINK_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4426
:::::: The code at line 4422 was first introduced by commit
:::::: 4c80c7bc583a87ded5f61906f81256b57c795806 bpf: Fix build in minimal configurations, again
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Daniel Borkmann <daniel(a)iogearbox.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[sashal-linux-stable:pending-4.9 57/84] net/6lowpan/debugfs.c:180:3: warning: 'return' with no value, in function returning non-void
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-4.9
head: 2a1ce5a3b34767c4c3175f7fae2f35f7bbc7b819
commit: 68c66a31cc9a38a26a89f9594945390a09355728 [57/84] 6lowpan: iphc: Fix an off-by-one check of array index
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable pending-4.9
git checkout 68c66a31cc9a38a26a89f9594945390a09355728
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/linkage.h:4:0,
from include/linux/fs.h:4,
from include/linux/debugfs.h:18,
from include/net/6lowpan.h:56,
from net/6lowpan/debugfs.c:15:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
BUG_ON(!virt_addr_valid(buf));
^~~~~~
arch/xtensa/include/asm/page.h:193:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/dma-mapping.h:284:2: note: in expansion of macro 'BUG_ON'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~
include/linux/dma-mapping.h:284:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
net/6lowpan/debugfs.c: In function 'lowpan_dev_debugfs_ctx_init':
>> net/6lowpan/debugfs.c:180:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
return;
^~~~~~
net/6lowpan/debugfs.c:172:12: note: declared here
static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/return +180 net/6lowpan/debugfs.c
171
172 static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
173 struct dentry *ctx, u8 id)
174 {
175 struct lowpan_dev *ldev = lowpan_dev(dev);
176 struct dentry *dentry, *root;
177 char buf[32];
178
179 if (WARN_ON_ONCE(id >= LOWPAN_IPHC_CTX_TABLE_SIZE))
> 180 return;
181
182 sprintf(buf, "%d", id);
183
184 root = debugfs_create_dir(buf, ctx);
185 if (!root)
186 return -EINVAL;
187
188 dentry = debugfs_create_file("active", 0644, root,
189 &ldev->ctx.table[id],
190 &lowpan_ctx_flag_active_fops);
191 if (!dentry)
192 return -EINVAL;
193
194 dentry = debugfs_create_file("compression", 0644, root,
195 &ldev->ctx.table[id],
196 &lowpan_ctx_flag_c_fops);
197 if (!dentry)
198 return -EINVAL;
199
200 dentry = debugfs_create_file("prefix", 0644, root,
201 &ldev->ctx.table[id],
202 &lowpan_ctx_pfx_fops);
203 if (!dentry)
204 return -EINVAL;
205
206 dentry = debugfs_create_file("prefix_len", 0644, root,
207 &ldev->ctx.table[id],
208 &lowpan_ctx_plen_fops);
209 if (!dentry)
210 return -EINVAL;
211
212 return 0;
213 }
214
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[sashal-linux-stable:linux-5.4.y 116/174] net/core/filter.c:4043:21: sparse: sparse: cast removes address space '<asn:3>' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git linux-5.4.y
head: e75220890bf6b37c5f7b1dbd81d8292ed6d96643
commit: b8403f7e45e57ee705bcc2fe99d34ea44703ec3a [116/174] riscv/atomic: Fix sign extension for RV64I
config: riscv-randconfig-s031-20210913 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable linux-5.4.y
git checkout b8403f7e45e57ee705bcc2fe99d34ea44703ec3a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/core/filter.c:411:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:414:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:417:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:420:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:423:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:497:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:500:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:503:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:1391:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] <asn:1> *filter @@
net/core/filter.c:1391:39: sparse: expected struct sock_filter const *filter
net/core/filter.c:1391:39: sparse: got struct sock_filter [noderef] <asn:1> *filter
net/core/filter.c:1469:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] <asn:1> *filter @@
net/core/filter.c:1469:39: sparse: expected struct sock_filter const *filter
net/core/filter.c:1469:39: sparse: got struct sock_filter [noderef] <asn:1> *filter
>> net/core/filter.c:4043:21: sparse: sparse: cast removes address space '<asn:3>' of expression
net/core/filter.c:6801:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:6804:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:6807:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:8504:31: sparse: sparse: symbol 'cg_skb_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8510:27: sparse: sparse: symbol 'cg_skb_prog_ops' was not declared. Should it be static?
net/core/filter.c:8555:31: sparse: sparse: symbol 'cg_sock_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8561:27: sparse: sparse: symbol 'cg_sock_prog_ops' was not declared. Should it be static?
net/core/filter.c:8564:31: sparse: sparse: symbol 'cg_sock_addr_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8570:27: sparse: sparse: symbol 'cg_sock_addr_prog_ops' was not declared. Should it be static?
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:215:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:242:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:1893:43: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@
net/core/filter.c:1893:43: sparse: expected restricted __wsum [usertype] diff
net/core/filter.c:1893:43: sparse: got unsigned long long [usertype] to
net/core/filter.c:1896:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be16 [usertype] old @@ got unsigned long long [usertype] from @@
net/core/filter.c:1896:36: sparse: expected restricted __be16 [usertype] old
net/core/filter.c:1896:36: sparse: got unsigned long long [usertype] from
net/core/filter.c:1896:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] new @@ got unsigned long long [usertype] to @@
net/core/filter.c:1896:42: sparse: expected restricted __be16 [usertype] new
net/core/filter.c:1896:42: sparse: got unsigned long long [usertype] to
net/core/filter.c:1899:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1899:36: sparse: expected restricted __be32 [usertype] from
net/core/filter.c:1899:36: sparse: got unsigned long long [usertype] from
net/core/filter.c:1899:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1899:42: sparse: expected restricted __be32 [usertype] to
net/core/filter.c:1899:42: sparse: got unsigned long long [usertype] to
net/core/filter.c:1944:59: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@
net/core/filter.c:1944:59: sparse: expected restricted __wsum [usertype] diff
net/core/filter.c:1944:59: sparse: got unsigned long long [usertype] to
net/core/filter.c:1947:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1947:52: sparse: expected restricted __be16 [usertype] from
net/core/filter.c:1947:52: sparse: got unsigned long long [usertype] from
net/core/filter.c:1947:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be16 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1947:58: sparse: expected restricted __be16 [usertype] to
net/core/filter.c:1947:58: sparse: got unsigned long long [usertype] to
net/core/filter.c:1950:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1950:52: sparse: expected restricted __be32 [usertype] from
net/core/filter.c:1950:52: sparse: got unsigned long long [usertype] from
net/core/filter.c:1950:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1950:58: sparse: expected restricted __be32 [usertype] to
net/core/filter.c:1950:58: sparse: got unsigned long long [usertype] to
net/core/filter.c:1996:28: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned long long @@ got restricted __wsum @@
net/core/filter.c:1996:28: sparse: expected unsigned long long
net/core/filter.c:1996:28: sparse: got restricted __wsum
net/core/filter.c:2018:35: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned long long @@ got restricted __wsum [usertype] csum @@
net/core/filter.c:2018:35: sparse: expected unsigned long long
net/core/filter.c:2018:35: sparse: got restricted __wsum [usertype] csum
net/core/filter.c:4570:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] spi @@ got restricted __be32 const [usertype] spi @@
net/core/filter.c:4570:17: sparse: expected unsigned int [usertype] spi
net/core/filter.c:4570:17: sparse: got restricted __be32 const [usertype] spi
net/core/filter.c:4578:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] remote_ipv4 @@ got restricted __be32 const [usertype] a4 @@
net/core/filter.c:4578:33: sparse: expected unsigned int [usertype] remote_ipv4
net/core/filter.c:4578:33: sparse: got restricted __be32 const [usertype] a4
vim +4043 net/core/filter.c
14ca0751c96f8d Daniel Borkmann 2016-03-04 4031
14ca0751c96f8d Daniel Borkmann 2016-03-04 4032 static const struct bpf_func_proto *
14ca0751c96f8d Daniel Borkmann 2016-03-04 4033 bpf_get_skb_set_tunnel_proto(enum bpf_func_id which)
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4034 {
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4035 if (!md_dst) {
d66f2b91f95b56 Jakub Kicinski 2017-10-09 4036 struct metadata_dst __percpu *tmp;
d66f2b91f95b56 Jakub Kicinski 2017-10-09 4037
d66f2b91f95b56 Jakub Kicinski 2017-10-09 4038 tmp = metadata_dst_alloc_percpu(IP_TUNNEL_OPTS_MAX,
3fcece12bc1b6d Jakub Kicinski 2017-06-23 4039 METADATA_IP_TUNNEL,
14ca0751c96f8d Daniel Borkmann 2016-03-04 4040 GFP_KERNEL);
d66f2b91f95b56 Jakub Kicinski 2017-10-09 4041 if (!tmp)
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4042 return NULL;
d66f2b91f95b56 Jakub Kicinski 2017-10-09 @4043 if (cmpxchg(&md_dst, NULL, tmp))
d66f2b91f95b56 Jakub Kicinski 2017-10-09 4044 metadata_dst_free_percpu(tmp);
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4045 }
14ca0751c96f8d Daniel Borkmann 2016-03-04 4046
14ca0751c96f8d Daniel Borkmann 2016-03-04 4047 switch (which) {
14ca0751c96f8d Daniel Borkmann 2016-03-04 4048 case BPF_FUNC_skb_set_tunnel_key:
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4049 return &bpf_skb_set_tunnel_key_proto;
14ca0751c96f8d Daniel Borkmann 2016-03-04 4050 case BPF_FUNC_skb_set_tunnel_opt:
14ca0751c96f8d Daniel Borkmann 2016-03-04 4051 return &bpf_skb_set_tunnel_opt_proto;
14ca0751c96f8d Daniel Borkmann 2016-03-04 4052 default:
14ca0751c96f8d Daniel Borkmann 2016-03-04 4053 return NULL;
14ca0751c96f8d Daniel Borkmann 2016-03-04 4054 }
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4055 }
d3aa45ce6b94c6 Alexei Starovoitov 2015-07-30 4056
:::::: The code at line 4043 was first introduced by commit
:::::: d66f2b91f95b56e31772b9faa0d036cd2e53cb02 bpf: don't rely on the verifier lock for metadata_dst allocation
:::::: TO: Jakub Kicinski <jakub.kicinski(a)netronome.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[sashal-linux-stable:pending-4.4 29/69] drivers/regulator/tps65910-regulator.c:1212:11: error: implicit declaration of function 'dev_err_probe'; did you mean 'device_reprobe'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-4.4
head: 1f942289a34c4addb1ba3d6595dbd91e6e1500a7
commit: 479df1758a097d18090190d1c96c21f6de6862e5 [29/69] regulator: tps65910: Silence deferred probe error
config: arc-randconfig-r043-20210913 (attached as .config)
compiler: arc-elf-gcc (GCC) 7.5.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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable pending-4.4
git checkout 479df1758a097d18090190d1c96c21f6de6862e5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:16:0,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from include/linux/lockdep.h:23,
from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:81,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/regulator/tps65910-regulator.c:17:
arch/arc/include/asm/cmpxchg.h: In function '__cmpxchg':
arch/arc/include/asm/cmpxchg.h:61:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (prev == expected)
^~
drivers/regulator/tps65910-regulator.c: In function 'tps65910_probe':
>> drivers/regulator/tps65910-regulator.c:1212:11: error: implicit declaration of function 'dev_err_probe'; did you mean 'device_reprobe'? [-Werror=implicit-function-declaration]
return dev_err_probe(tps65910->dev, PTR_ERR(rdev),
^~~~~~~~~~~~~
device_reprobe
cc1: some warnings being treated as errors
vim +1212 drivers/regulator/tps65910-regulator.c
1075
1076 static int tps65910_probe(struct platform_device *pdev)
1077 {
1078 struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent);
1079 struct regulator_config config = { };
1080 struct tps_info *info;
1081 struct regulator_dev *rdev;
1082 struct tps65910_reg *pmic;
1083 struct tps65910_board *pmic_plat_data;
1084 struct of_regulator_match *tps65910_reg_matches = NULL;
1085 int i, err;
1086
1087 pmic_plat_data = dev_get_platdata(tps65910->dev);
1088 if (!pmic_plat_data && tps65910->dev->of_node)
1089 pmic_plat_data = tps65910_parse_dt_reg_data(pdev,
1090 &tps65910_reg_matches);
1091
1092 if (!pmic_plat_data) {
1093 dev_err(&pdev->dev, "Platform data not found\n");
1094 return -EINVAL;
1095 }
1096
1097 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
1098 if (!pmic)
1099 return -ENOMEM;
1100
1101 pmic->mfd = tps65910;
1102 platform_set_drvdata(pdev, pmic);
1103
1104 /* Give control of all register to control port */
1105 err = tps65910_reg_set_bits(pmic->mfd, TPS65910_DEVCTRL,
1106 DEVCTRL_SR_CTL_I2C_SEL_MASK);
1107 if (err < 0)
1108 return err;
1109
1110 switch (tps65910_chip_id(tps65910)) {
1111 case TPS65910:
1112 pmic->get_ctrl_reg = &tps65910_get_ctrl_register;
1113 pmic->num_regulators = ARRAY_SIZE(tps65910_regs);
1114 pmic->ext_sleep_control = tps65910_ext_sleep_control;
1115 info = tps65910_regs;
1116 /* Work around silicon erratum SWCZ010: output programmed
1117 * voltage level can go higher than expected or crash
1118 * Workaround: use no synchronization of DCDC clocks
1119 */
1120 tps65910_reg_clear_bits(pmic->mfd, TPS65910_DCDCCTRL,
1121 DCDCCTRL_DCDCCKSYNC_MASK);
1122 break;
1123 case TPS65911:
1124 pmic->get_ctrl_reg = &tps65911_get_ctrl_register;
1125 pmic->num_regulators = ARRAY_SIZE(tps65911_regs);
1126 pmic->ext_sleep_control = tps65911_ext_sleep_control;
1127 info = tps65911_regs;
1128 break;
1129 default:
1130 dev_err(&pdev->dev, "Invalid tps chip version\n");
1131 return -ENODEV;
1132 }
1133
1134 pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1135 sizeof(struct regulator_desc), GFP_KERNEL);
1136 if (!pmic->desc)
1137 return -ENOMEM;
1138
1139 pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1140 sizeof(struct tps_info *), GFP_KERNEL);
1141 if (!pmic->info)
1142 return -ENOMEM;
1143
1144 pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1145 sizeof(struct regulator_dev *), GFP_KERNEL);
1146 if (!pmic->rdev)
1147 return -ENOMEM;
1148
1149 for (i = 0; i < pmic->num_regulators && i < TPS65910_NUM_REGS;
1150 i++, info++) {
1151 /* Register the regulators */
1152 pmic->info[i] = info;
1153
1154 pmic->desc[i].name = info->name;
1155 pmic->desc[i].supply_name = info->vin_name;
1156 pmic->desc[i].id = i;
1157 pmic->desc[i].n_voltages = info->n_voltages;
1158 pmic->desc[i].enable_time = info->enable_time_us;
1159
1160 if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) {
1161 pmic->desc[i].ops = &tps65910_ops_dcdc;
1162 pmic->desc[i].n_voltages = VDD1_2_NUM_VOLT_FINE *
1163 VDD1_2_NUM_VOLT_COARSE;
1164 pmic->desc[i].ramp_delay = 12500;
1165 } else if (i == TPS65910_REG_VDD3) {
1166 if (tps65910_chip_id(tps65910) == TPS65910) {
1167 pmic->desc[i].ops = &tps65910_ops_vdd3;
1168 pmic->desc[i].volt_table = info->voltage_table;
1169 } else {
1170 pmic->desc[i].ops = &tps65910_ops_dcdc;
1171 pmic->desc[i].ramp_delay = 5000;
1172 }
1173 } else if (i == TPS65910_REG_VBB &&
1174 tps65910_chip_id(tps65910) == TPS65910) {
1175 pmic->desc[i].ops = &tps65910_ops_vbb;
1176 pmic->desc[i].volt_table = info->voltage_table;
1177 } else {
1178 if (tps65910_chip_id(tps65910) == TPS65910) {
1179 pmic->desc[i].ops = &tps65910_ops;
1180 pmic->desc[i].volt_table = info->voltage_table;
1181 } else {
1182 pmic->desc[i].ops = &tps65911_ops;
1183 }
1184 }
1185
1186 err = tps65910_set_ext_sleep_config(pmic, i,
1187 pmic_plat_data->regulator_ext_sleep_control[i]);
1188 /*
1189 * Failing on regulator for configuring externally control
1190 * is not a serious issue, just throw warning.
1191 */
1192 if (err < 0)
1193 dev_warn(tps65910->dev,
1194 "Failed to initialise ext control config\n");
1195
1196 pmic->desc[i].type = REGULATOR_VOLTAGE;
1197 pmic->desc[i].owner = THIS_MODULE;
1198 pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i);
1199 pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;
1200
1201 config.dev = tps65910->dev;
1202 config.init_data = pmic_plat_data->tps65910_pmic_init_data[i];
1203 config.driver_data = pmic;
1204 config.regmap = tps65910->regmap;
1205
1206 if (tps65910_reg_matches)
1207 config.of_node = tps65910_reg_matches[i].of_node;
1208
1209 rdev = devm_regulator_register(&pdev->dev, &pmic->desc[i],
1210 &config);
1211 if (IS_ERR(rdev))
> 1212 return dev_err_probe(tps65910->dev, PTR_ERR(rdev),
1213 "failed to register %s regulator\n",
1214 pdev->name);
1215
1216 /* Save regulator for cleanup */
1217 pmic->rdev[i] = rdev;
1218 }
1219 return 0;
1220 }
1221
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[peterz-queue:sched/core 8/11] include/linux/sched.h:1722:57: warning: unused parameter 'dst'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 234b8ab6476c5edd5262e2ff563de9498d60044a
commit: b90ca8badbd11488e5f762346b028666808164e7 [8/11] sched: Introduce task_struct::user_cpus_ptr to track requested affinity
config: i386-randconfig-a016-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout b90ca8badbd11488e5f762346b028666808164e7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:21:
include/linux/seccomp.h:71:65: warning: unused parameter 'sd' [-Wunused-parameter]
static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
^
include/linux/seccomp.h:81:52: warning: unused parameter 'arg2' [-Wunused-parameter]
static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3)
^
include/linux/seccomp.h:81:71: warning: unused parameter 'arg3' [-Wunused-parameter]
static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3)
^
include/linux/seccomp.h:86:48: warning: unused parameter 's' [-Wunused-parameter]
static inline int seccomp_mode(struct seccomp *s)
^
include/linux/seccomp.h:96:63: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void seccomp_filter_release(struct task_struct *tsk)
^
include/linux/seccomp.h:100:59: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void get_seccomp_filter(struct task_struct *tsk)
^
include/linux/seccomp.h:112:59: warning: unused parameter 'task' [-Wunused-parameter]
static inline long seccomp_get_filter(struct task_struct *task,
^
include/linux/seccomp.h:113:25: warning: unused parameter 'n' [-Wunused-parameter]
unsigned long n, void __user *data)
^
include/linux/seccomp.h:113:41: warning: unused parameter 'data' [-Wunused-parameter]
unsigned long n, void __user *data)
^
include/linux/seccomp.h:117:61: warning: unused parameter 'task' [-Wunused-parameter]
static inline long seccomp_get_metadata(struct task_struct *task,
^
include/linux/seccomp.h:118:20: warning: unused parameter 'filter_off' [-Wunused-parameter]
unsigned long filter_off,
^
include/linux/seccomp.h:119:19: warning: unused parameter 'data' [-Wunused-parameter]
void __user *data)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:26:
include/linux/latencytop.h:47:47: warning: unused parameter 'task' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:47:57: warning: unused parameter 'usecs' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:47:68: warning: unused parameter 'inter' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:51:66: warning: unused parameter 'p' [-Wunused-parameter]
static inline void clear_tsk_latency_tracing(struct task_struct *p)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:33:
In file included from include/linux/posix-timers.h:9:
include/linux/task_work.h:30:55: warning: unused parameter 'task' [-Wunused-parameter]
static inline void exit_task_work(struct task_struct *task)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:33:
include/linux/posix-timers.h:174:65: warning: unused parameter 'pct' [-Wunused-parameter]
static inline void posix_cputimers_init(struct posix_cputimers *pct) { }
^
include/linux/posix-timers.h:175:71: warning: unused parameter 'pct' [-Wunused-parameter]
static inline void posix_cputimers_group_init(struct posix_cputimers *pct,
^
include/linux/posix-timers.h:176:16: warning: unused parameter 'cpu_limit' [-Wunused-parameter]
u64 cpu_limit) { }
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
include/linux/sched.h:1713:60: warning: unused parameter 'p' [-Wunused-parameter]
static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
^
include/linux/sched.h:1713:85: warning: unused parameter 'new_mask' [-Wunused-parameter]
static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
^
include/linux/sched.h:1716:60: warning: unused parameter 'p' [-Wunused-parameter]
static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
^
>> include/linux/sched.h:1722:57: warning: unused parameter 'dst' [-Wunused-parameter]
static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
^
>> include/linux/sched.h:1722:91: warning: unused parameter 'node' [-Wunused-parameter]
static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
^
include/linux/sched.h:1829:53: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void kick_process(struct task_struct *tsk) { }
^
include/linux/sched.h:1858:68: warning: unused parameter 'p' [-Wunused-parameter]
static inline unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state)
^
include/linux/sched.h:1858:84: warning: unused parameter 'match_state' [-Wunused-parameter]
static inline unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state)
^
include/linux/sched.h:1985:46: warning: unused parameter 'lock' [-Wunused-parameter]
static inline int spin_needbreak(spinlock_t *lock)
^
include/linux/sched.h:2002:46: warning: unused parameter 'lock' [-Wunused-parameter]
static inline int rwlock_needbreak(rwlock_t *lock)
^
include/linux/sched.h:2034:63: warning: unused parameter 'p' [-Wunused-parameter]
static inline unsigned int task_cpu(const struct task_struct *p)
^
include/linux/sched.h:2039:53: warning: unused parameter 'p' [-Wunused-parameter]
static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
^
include/linux/sched.h:2039:69: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
^
include/linux/sched.h:2054:42: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline bool vcpu_is_preempted(int cpu)
^
include/linux/sched.h:2154:63: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_set_notify_resume(struct task_struct *t)
^
include/linux/sched.h:2157:62: warning: unused parameter 'ksig' [-Wunused-parameter]
static inline void rseq_handle_notify_resume(struct ksignal *ksig,
^
include/linux/sched.h:2158:27: warning: unused parameter 'regs' [-Wunused-parameter]
struct pt_regs *regs)
^
include/linux/sched.h:2161:56: warning: unused parameter 'ksig' [-Wunused-parameter]
static inline void rseq_signal_deliver(struct ksignal *ksig,
^
include/linux/sched.h:2162:28: warning: unused parameter 'regs' [-Wunused-parameter]
struct pt_regs *regs)
^
include/linux/sched.h:2165:53: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_preempt(struct task_struct *t)
^
include/linux/sched.h:2168:53: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_migrate(struct task_struct *t)
^
include/linux/sched.h:2171:50: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
^
include/linux/sched.h:2171:67: warning: unused parameter 'clone_flags' [-Wunused-parameter]
static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
^
include/linux/sched.h:2174:52: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_execve(struct task_struct *t)
^
include/linux/sched.h:2186:49: warning: unused parameter 'regs' [-Wunused-parameter]
static inline void rseq_syscall(struct pt_regs *regs)
^
include/linux/sched.h:2212:56: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void sched_core_free(struct task_struct *tsk) { }
^
include/linux/sched.h:2213:56: warning: unused parameter 'p' [-Wunused-parameter]
static inline void sched_core_fork(struct task_struct *p) { }
^
In file included from drivers/gpu/drm/i915/i915_drv.c:30:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:10:
include/linux/sched/topology.h:210:36: warning: unused parameter 'ndoms_new' [-Wunused-parameter]
partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[],
^
include/linux/sched/topology.h:210:61: warning: unused parameter 'doms_new' [-Wunused-parameter]
partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[],
^
include/linux/sched/topology.h:211:37: warning: unused parameter 'dattr_new' [-Wunused-parameter]
struct sched_domain_attr *dattr_new)
^
include/linux/sched/topology.h:216:29: warning: unused parameter 'ndoms_new' [-Wunused-parameter]
partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
^
include/linux/sched/topology.h:216:54: warning: unused parameter 'doms_new' [-Wunused-parameter]
partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
^
include/linux/sched/topology.h:217:30: warning: unused parameter 'dattr_new' [-Wunused-parameter]
struct sched_domain_attr *dattr_new)
^
include/linux/sched/topology.h:221:41: warning: unused parameter 'this_cpu' [-Wunused-parameter]
static inline bool cpus_share_cache(int this_cpu, int that_cpu)
^
include/linux/sched/topology.h:221:55: warning: unused parameter 'that_cpu' [-Wunused-parameter]
static inline bool cpus_share_cache(int this_cpu, int that_cpu)
^
include/linux/sched/topology.h:248:43: warning: unused parameter 'cpu' [-Wunused-parameter]
unsigned long arch_scale_cpu_capacity(int cpu)
^
include/linux/sched/topology.h:256:47: warning: unused parameter 'cpu' [-Wunused-parameter]
--
In file included from include/linux/sched.h:22:
In file included from include/linux/nodemask.h:96:
include/linux/numa.h:47:47: warning: unused parameter 'node' [-Wunused-parameter]
static inline int numa_map_to_online_node(int node)
^
include/linux/numa.h:51:50: warning: unused parameter 'start' [-Wunused-parameter]
static inline int memory_add_physaddr_to_nid(u64 start)
^
include/linux/numa.h:55:43: warning: unused parameter 'start' [-Wunused-parameter]
static inline int phys_to_target_node(u64 start)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from include/linux/sched.h:22:
include/linux/nodemask.h:465:57: warning: unused parameter 'state' [-Wunused-parameter]
static inline int node_state(int node, enum node_states state)
^
include/linux/nodemask.h:470:39: warning: unused parameter 'node' [-Wunused-parameter]
static inline void node_set_state(int node, enum node_states state)
^
include/linux/nodemask.h:470:62: warning: unused parameter 'state' [-Wunused-parameter]
static inline void node_set_state(int node, enum node_states state)
^
include/linux/nodemask.h:474:41: warning: unused parameter 'node' [-Wunused-parameter]
static inline void node_clear_state(int node, enum node_states state)
^
include/linux/nodemask.h:474:64: warning: unused parameter 'state' [-Wunused-parameter]
static inline void node_clear_state(int node, enum node_states state)
^
include/linux/nodemask.h:478:51: warning: unused parameter 'state' [-Wunused-parameter]
static inline int num_node_state(enum node_states state)
^
include/linux/nodemask.h:500:49: warning: unused parameter 'mask' [-Wunused-parameter]
static inline int node_random(const nodemask_t *mask)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from include/linux/sched.h:26:
include/linux/latencytop.h:47:47: warning: unused parameter 'task' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:47:57: warning: unused parameter 'usecs' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:47:68: warning: unused parameter 'inter' [-Wunused-parameter]
account_scheduler_latency(struct task_struct *task, int usecs, int inter)
^
include/linux/latencytop.h:51:66: warning: unused parameter 'p' [-Wunused-parameter]
static inline void clear_tsk_latency_tracing(struct task_struct *p)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from include/linux/sched.h:33:
In file included from include/linux/posix-timers.h:9:
include/linux/task_work.h:30:55: warning: unused parameter 'task' [-Wunused-parameter]
static inline void exit_task_work(struct task_struct *task)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from include/linux/sched.h:33:
include/linux/posix-timers.h:174:65: warning: unused parameter 'pct' [-Wunused-parameter]
static inline void posix_cputimers_init(struct posix_cputimers *pct) { }
^
include/linux/posix-timers.h:175:71: warning: unused parameter 'pct' [-Wunused-parameter]
static inline void posix_cputimers_group_init(struct posix_cputimers *pct,
^
include/linux/posix-timers.h:176:16: warning: unused parameter 'cpu_limit' [-Wunused-parameter]
u64 cpu_limit) { }
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
include/linux/sched.h:1713:60: warning: unused parameter 'p' [-Wunused-parameter]
static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
^
include/linux/sched.h:1713:85: warning: unused parameter 'new_mask' [-Wunused-parameter]
static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
^
include/linux/sched.h:1716:60: warning: unused parameter 'p' [-Wunused-parameter]
static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
^
>> include/linux/sched.h:1722:57: warning: unused parameter 'dst' [-Wunused-parameter]
static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
^
>> include/linux/sched.h:1722:91: warning: unused parameter 'node' [-Wunused-parameter]
static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
^
include/linux/sched.h:1829:53: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void kick_process(struct task_struct *tsk) { }
^
include/linux/sched.h:1858:68: warning: unused parameter 'p' [-Wunused-parameter]
static inline unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state)
^
include/linux/sched.h:1858:84: warning: unused parameter 'match_state' [-Wunused-parameter]
static inline unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state)
^
include/linux/sched.h:1985:46: warning: unused parameter 'lock' [-Wunused-parameter]
static inline int spin_needbreak(spinlock_t *lock)
^
include/linux/sched.h:2002:46: warning: unused parameter 'lock' [-Wunused-parameter]
static inline int rwlock_needbreak(rwlock_t *lock)
^
include/linux/sched.h:2034:63: warning: unused parameter 'p' [-Wunused-parameter]
static inline unsigned int task_cpu(const struct task_struct *p)
^
include/linux/sched.h:2039:53: warning: unused parameter 'p' [-Wunused-parameter]
static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
^
include/linux/sched.h:2039:69: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
^
include/linux/sched.h:2054:42: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline bool vcpu_is_preempted(int cpu)
^
include/linux/sched.h:2154:63: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_set_notify_resume(struct task_struct *t)
^
include/linux/sched.h:2157:62: warning: unused parameter 'ksig' [-Wunused-parameter]
static inline void rseq_handle_notify_resume(struct ksignal *ksig,
^
include/linux/sched.h:2158:27: warning: unused parameter 'regs' [-Wunused-parameter]
struct pt_regs *regs)
^
include/linux/sched.h:2161:56: warning: unused parameter 'ksig' [-Wunused-parameter]
static inline void rseq_signal_deliver(struct ksignal *ksig,
^
include/linux/sched.h:2162:28: warning: unused parameter 'regs' [-Wunused-parameter]
struct pt_regs *regs)
^
include/linux/sched.h:2165:53: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_preempt(struct task_struct *t)
^
include/linux/sched.h:2168:53: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_migrate(struct task_struct *t)
^
include/linux/sched.h:2171:50: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
^
include/linux/sched.h:2171:67: warning: unused parameter 'clone_flags' [-Wunused-parameter]
static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
^
include/linux/sched.h:2174:52: warning: unused parameter 't' [-Wunused-parameter]
static inline void rseq_execve(struct task_struct *t)
^
include/linux/sched.h:2186:49: warning: unused parameter 'regs' [-Wunused-parameter]
static inline void rseq_syscall(struct pt_regs *regs)
^
include/linux/sched.h:2212:56: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void sched_core_free(struct task_struct *tsk) { }
^
include/linux/sched.h:2213:56: warning: unused parameter 'p' [-Wunused-parameter]
static inline void sched_core_fork(struct task_struct *p) { }
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
include/linux/vtime.h:28:57: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_user_enter(struct task_struct *tsk) { }
^
include/linux/vtime.h:29:56: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_user_exit(struct task_struct *tsk) { }
^
include/linux/vtime.h:30:58: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_guest_enter(struct task_struct *tsk) { }
^
include/linux/vtime.h:31:57: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_guest_exit(struct task_struct *tsk) { }
^
include/linux/vtime.h:32:56: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
^
include/linux/vtime.h:32:65: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
^
include/linux/vtime.h:41:58: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
^
include/linux/vtime.h:41:76: warning: unused parameter 'offset' [-Wunused-parameter]
static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
^
include/linux/vtime.h:42:62: warning: unused parameter 'tsk' [-Wunused-parameter]
static inline void vtime_account_softirq(struct task_struct *tsk) { }
..
vim +/dst +1722 include/linux/sched.h
1704
1705 extern int cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial);
1706 extern int task_can_attach(struct task_struct *p, const struct cpumask *cs_cpus_allowed);
1707 #ifdef CONFIG_SMP
1708 extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
1709 extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
1710 extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
1711 extern void release_user_cpus_ptr(struct task_struct *p);
1712 #else
> 1713 static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
1714 {
1715 }
1716 static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
1717 {
1718 if (!cpumask_test_cpu(0, new_mask))
1719 return -EINVAL;
1720 return 0;
1721 }
> 1722 static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
1723 {
1724 if (src->user_cpus_ptr)
1725 return -EINVAL;
1726 return 0;
1727 }
1728 static inline void release_user_cpus_ptr(struct task_struct *p)
1729 {
1730 WARN_ON(p->user_cpus_ptr);
1731 }
1732 #endif
1733
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *'
by kernel test robot
Hi Carl,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f306b90c69ce3994bb8046b54374a90a27f66be6
commit: 322b60ceb0f321b4b9c41717f7306c0dbaf0279b ath11k: do not depend on ARCH_QCOM for ath11k
date: 1 year, 1 month ago
config: x86_64-randconfig-a013-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 322b60ceb0f321b4b9c41717f7306c0dbaf0279b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Wvoid-pointer-to-enum-cast]
ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +938 drivers/net/wireless/ath/ath11k/ahb.c
31858805f91ac7 Govind Singh 2020-05-08 903
d5c65159f28953 Kalle Valo 2019-11-23 904 static int ath11k_ahb_probe(struct platform_device *pdev)
d5c65159f28953 Kalle Valo 2019-11-23 905 {
d5c65159f28953 Kalle Valo 2019-11-23 906 struct ath11k_base *ab;
d5c65159f28953 Kalle Valo 2019-11-23 907 const struct of_device_id *of_id;
d5c65159f28953 Kalle Valo 2019-11-23 908 struct resource *mem_res;
d5c65159f28953 Kalle Valo 2019-11-23 909 void __iomem *mem;
d5c65159f28953 Kalle Valo 2019-11-23 910 int ret;
d5c65159f28953 Kalle Valo 2019-11-23 911
d5c65159f28953 Kalle Valo 2019-11-23 912 of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
d5c65159f28953 Kalle Valo 2019-11-23 913 if (!of_id) {
d5c65159f28953 Kalle Valo 2019-11-23 914 dev_err(&pdev->dev, "failed to find matching device tree id\n");
d5c65159f28953 Kalle Valo 2019-11-23 915 return -EINVAL;
d5c65159f28953 Kalle Valo 2019-11-23 916 }
d5c65159f28953 Kalle Valo 2019-11-23 917
c8ffcd12276061 Wei Yongjun 2020-05-08 918 mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 919 if (IS_ERR(mem)) {
d5c65159f28953 Kalle Valo 2019-11-23 920 dev_err(&pdev->dev, "ioremap error\n");
d5c65159f28953 Kalle Valo 2019-11-23 921 return PTR_ERR(mem);
d5c65159f28953 Kalle Valo 2019-11-23 922 }
d5c65159f28953 Kalle Valo 2019-11-23 923
d5c65159f28953 Kalle Valo 2019-11-23 924 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
d5c65159f28953 Kalle Valo 2019-11-23 925 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 926 dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
d5c65159f28953 Kalle Valo 2019-11-23 927 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 928 }
d5c65159f28953 Kalle Valo 2019-11-23 929
630ad41c195c70 Govind Singh 2020-05-08 930 ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
d5c65159f28953 Kalle Valo 2019-11-23 931 if (!ab) {
d5c65159f28953 Kalle Valo 2019-11-23 932 dev_err(&pdev->dev, "failed to allocate ath11k base\n");
d5c65159f28953 Kalle Valo 2019-11-23 933 return -ENOMEM;
d5c65159f28953 Kalle Valo 2019-11-23 934 }
d5c65159f28953 Kalle Valo 2019-11-23 935
31858805f91ac7 Govind Singh 2020-05-08 936 ab->hif.ops = &ath11k_ahb_hif_ops;
d5c65159f28953 Kalle Valo 2019-11-23 937 ab->pdev = pdev;
d5c65159f28953 Kalle Valo 2019-11-23 @938 ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
d5c65159f28953 Kalle Valo 2019-11-23 939 ab->mem = mem;
d5c65159f28953 Kalle Valo 2019-11-23 940 ab->mem_len = resource_size(mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 941 platform_set_drvdata(pdev, ab);
d5c65159f28953 Kalle Valo 2019-11-23 942
d5c65159f28953 Kalle Valo 2019-11-23 943 ret = ath11k_hal_srng_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 944 if (ret)
d5c65159f28953 Kalle Valo 2019-11-23 945 goto err_core_free;
d5c65159f28953 Kalle Valo 2019-11-23 946
d5c65159f28953 Kalle Valo 2019-11-23 947 ret = ath11k_ce_alloc_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 948 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 949 ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 950 goto err_hal_srng_deinit;
d5c65159f28953 Kalle Valo 2019-11-23 951 }
d5c65159f28953 Kalle Valo 2019-11-23 952
d5c65159f28953 Kalle Valo 2019-11-23 953 ath11k_ahb_init_qmi_ce_config(ab);
d5c65159f28953 Kalle Valo 2019-11-23 954
166e22b38aa3bc Anilkumar Kolli 2020-06-16 955 ret = ath11k_core_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 956 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 957 ath11k_err(ab, "failed to init core: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 958 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 959 }
d5c65159f28953 Kalle Valo 2019-11-23 960
166e22b38aa3bc Anilkumar Kolli 2020-06-16 961 ret = ath11k_ahb_config_irq(ab);
d5c65159f28953 Kalle Valo 2019-11-23 962 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 963 ath11k_err(ab, "failed to configure irq: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 964 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 965 }
d5c65159f28953 Kalle Valo 2019-11-23 966
d5c65159f28953 Kalle Valo 2019-11-23 967 return 0;
d5c65159f28953 Kalle Valo 2019-11-23 968
d5c65159f28953 Kalle Valo 2019-11-23 969 err_ce_free:
d5c65159f28953 Kalle Valo 2019-11-23 970 ath11k_ce_free_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 971
d5c65159f28953 Kalle Valo 2019-11-23 972 err_hal_srng_deinit:
d5c65159f28953 Kalle Valo 2019-11-23 973 ath11k_hal_srng_deinit(ab);
d5c65159f28953 Kalle Valo 2019-11-23 974
d5c65159f28953 Kalle Valo 2019-11-23 975 err_core_free:
d5c65159f28953 Kalle Valo 2019-11-23 976 ath11k_core_free(ab);
d5c65159f28953 Kalle Valo 2019-11-23 977 platform_set_drvdata(pdev, NULL);
d5c65159f28953 Kalle Valo 2019-11-23 978
d5c65159f28953 Kalle Valo 2019-11-23 979 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 980 }
d5c65159f28953 Kalle Valo 2019-11-23 981
:::::: The code at line 938 was first introduced by commit
:::::: d5c65159f2895379e11ca13f62feabe93278985d ath11k: driver for Qualcomm IEEE 802.11ax devices
:::::: TO: Kalle Valo <kvalo(a)codeaurora.org>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[android-common:android12-5.4 5/9] drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: e3919bfeb0066ab9b5f9765e5610b95672990e64 [5/9] ANDROID: dma-buf: system_heap: Add deferred freeing to the system heap
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout e3919bfeb0066ab9b5f9765e5610b95672990e64
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
>> drivers/dma-buf/heaps/deferred-free-helper.c:24:20: sparse: sparse: symbol 'freelist_task' was not declared. Should it be static?
vim +/freelist_waitqueue +23 drivers/dma-buf/heaps/deferred-free-helper.c
bd1639945c3029 John Stultz 2020-12-09 20
bd1639945c3029 John Stultz 2020-12-09 21 static LIST_HEAD(free_list);
bd1639945c3029 John Stultz 2020-12-09 22 static size_t list_nr_pages;
bd1639945c3029 John Stultz 2020-12-09 @23 wait_queue_head_t freelist_waitqueue;
bd1639945c3029 John Stultz 2020-12-09 @24 struct task_struct *freelist_task;
bd1639945c3029 John Stultz 2020-12-09 25 static DEFINE_SPINLOCK(free_list_lock);
bd1639945c3029 John Stultz 2020-12-09 26
:::::: The code at line 23 was first introduced by commit
:::::: bd1639945c30298e4bea2b611d6b0cd08d3cdd98 ANDROID: dma-buf: heaps: Add deferred-free-helper library code
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year