[chrome-os:chromeos-5.10 1/1] drivers/gpu/drm/evdi/evdi_gem.c:253:25: error: implicit declaration of function 'vmap'; did you mean 'kmap'?
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: ae25dd46c5c2fecb4868af3a91418dea519deac9
commit: ae25dd46c5c2fecb4868af3a91418dea519deac9 [1/1] CHROMIUM: Import latest evdi driver
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout ae25dd46c5c2fecb4868af3a91418dea519deac9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the chrome-os/chromeos-5.10 HEAD e32cec44c9066e3163c5c96f72819ef9394f04e0 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
drivers/gpu/drm/evdi/evdi_gem.c: In function 'evdi_gem_vmap':
>> drivers/gpu/drm/evdi/evdi_gem.c:253:25: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
253 | obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
| ^~~~
| kmap
drivers/gpu/drm/evdi/evdi_gem.c:253:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
253 | obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
| ^
drivers/gpu/drm/evdi/evdi_gem.c: In function 'evdi_gem_vunmap':
>> drivers/gpu/drm/evdi/evdi_gem.c:274:17: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
274 | vunmap(obj->vmapping);
| ^~~~~~
| kunmap
cc1: some warnings being treated as errors
vim +253 drivers/gpu/drm/evdi/evdi_gem.c
3e21cedd503fabd Aleksander Miera 2018-03-15 227
3e21cedd503fabd Aleksander Miera 2018-03-15 228 int evdi_gem_vmap(struct evdi_gem_object *obj)
3e21cedd503fabd Aleksander Miera 2018-03-15 229 {
3e21cedd503fabd Aleksander Miera 2018-03-15 230 int page_count = obj->base.size / PAGE_SIZE;
3e21cedd503fabd Aleksander Miera 2018-03-15 231 int ret;
3e21cedd503fabd Aleksander Miera 2018-03-15 232
3e21cedd503fabd Aleksander Miera 2018-03-15 233 if (obj->base.import_attach) {
79e3410df198df7 Sean Paul 2021-04-09 234 #if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
5d42c7b3d93d6ce Sean Paul 2021-04-09 235 struct dma_buf_map map;
5d42c7b3d93d6ce Sean Paul 2021-04-09 236
5d42c7b3d93d6ce Sean Paul 2021-04-09 237 ret = dma_buf_vmap(obj->base.import_attach->dmabuf, &map);
5d42c7b3d93d6ce Sean Paul 2021-04-09 238 if (ret)
5d42c7b3d93d6ce Sean Paul 2021-04-09 239 return -ENOMEM;
5d42c7b3d93d6ce Sean Paul 2021-04-09 240 obj->vmapping = map.vaddr;
5d42c7b3d93d6ce Sean Paul 2021-04-09 241 #else
3e21cedd503fabd Aleksander Miera 2018-03-15 242 obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf);
3e21cedd503fabd Aleksander Miera 2018-03-15 243 if (!obj->vmapping)
3e21cedd503fabd Aleksander Miera 2018-03-15 244 return -ENOMEM;
5d42c7b3d93d6ce Sean Paul 2021-04-09 245 #endif
3e21cedd503fabd Aleksander Miera 2018-03-15 246 return 0;
3e21cedd503fabd Aleksander Miera 2018-03-15 247 }
3e21cedd503fabd Aleksander Miera 2018-03-15 248
67442e0531eb839 Guenter Roeck 2020-11-04 249 ret = evdi_gem_get_pages(obj, GFP_KERNEL);
3e21cedd503fabd Aleksander Miera 2018-03-15 250 if (ret)
3e21cedd503fabd Aleksander Miera 2018-03-15 251 return ret;
3e21cedd503fabd Aleksander Miera 2018-03-15 252
3e21cedd503fabd Aleksander Miera 2018-03-15 @253 obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
3e21cedd503fabd Aleksander Miera 2018-03-15 254 if (!obj->vmapping)
3e21cedd503fabd Aleksander Miera 2018-03-15 255 return -ENOMEM;
3e21cedd503fabd Aleksander Miera 2018-03-15 256 return 0;
3e21cedd503fabd Aleksander Miera 2018-03-15 257 }
3e21cedd503fabd Aleksander Miera 2018-03-15 258
3e21cedd503fabd Aleksander Miera 2018-03-15 259 void evdi_gem_vunmap(struct evdi_gem_object *obj)
3e21cedd503fabd Aleksander Miera 2018-03-15 260 {
3e21cedd503fabd Aleksander Miera 2018-03-15 261 if (obj->base.import_attach) {
79e3410df198df7 Sean Paul 2021-04-09 262 #if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
5d42c7b3d93d6ce Sean Paul 2021-04-09 263 struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(obj->vmapping);
5d42c7b3d93d6ce Sean Paul 2021-04-09 264
5d42c7b3d93d6ce Sean Paul 2021-04-09 265 dma_buf_vunmap(obj->base.import_attach->dmabuf, &map);
5d42c7b3d93d6ce Sean Paul 2021-04-09 266 #else
3e21cedd503fabd Aleksander Miera 2018-03-15 267 dma_buf_vunmap(obj->base.import_attach->dmabuf, obj->vmapping);
5d42c7b3d93d6ce Sean Paul 2021-04-09 268 #endif
3e21cedd503fabd Aleksander Miera 2018-03-15 269 obj->vmapping = NULL;
3e21cedd503fabd Aleksander Miera 2018-03-15 270 return;
3e21cedd503fabd Aleksander Miera 2018-03-15 271 }
3e21cedd503fabd Aleksander Miera 2018-03-15 272
3e21cedd503fabd Aleksander Miera 2018-03-15 273 if (obj->vmapping) {
3e21cedd503fabd Aleksander Miera 2018-03-15 @274 vunmap(obj->vmapping);
3e21cedd503fabd Aleksander Miera 2018-03-15 275 obj->vmapping = NULL;
3e21cedd503fabd Aleksander Miera 2018-03-15 276 }
3e21cedd503fabd Aleksander Miera 2018-03-15 277
3e21cedd503fabd Aleksander Miera 2018-03-15 278 evdi_gem_put_pages(obj);
3e21cedd503fabd Aleksander Miera 2018-03-15 279 }
3e21cedd503fabd Aleksander Miera 2018-03-15 280
:::::: The code at line 253 was first introduced by commit
:::::: 3e21cedd503fabd195cf407652bf87fd83e202ac drm/evdi: Add atomic evdi drm module
:::::: TO: Aleksander Miera <aleksander.miera(a)displaylink.com>
:::::: CC: Guenter Roeck <groeck(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v2 1/1] riscv: __asm_copy_to-from_user: Improve using word copy, if size is < 9*SZREG
by kernel test robot
Hi Akira,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15 next-20211111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Akira-Tsukamoto/__asm_copy_to-fr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git debe436e77c72fcee804fb867f275e6d31aa999c
config: riscv-buildonly-randconfig-r002-20211111 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 63ef0e17e28827eae53133b3467bdac7d9729318)
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-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/cf2e8e9c4e9dc65552ca5ac0c85c19878...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akira-Tsukamoto/__asm_copy_to-from_user-Reduce-more-byte_copy/20211111-161445
git checkout cf2e8e9c4e9dc65552ca5ac0c85c198785f5d91c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash
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 >>):
>> <instantiation>:5:14: error: unknown token in expression
.word 100b,
^
arch/riscv/lib/uaccess.S:92:2: note: while in macro instantiation
fixup lw a5, 0(a1)
^
>> <instantiation>:5:14: error: unknown token in expression
.word 100b,
^
arch/riscv/lib/uaccess.S:94:2: note: while in macro instantiation
fixup sw a5, 0(a0)
^
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[toke:xdp-queueing-01 4/9] net/core/filter.c:4153:31: error: implicit declaration of function 'pifo_map_dequeue'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-queueing-01
head: 7cdc645073a59261514e56e1a4c6d0dac1b24b32
commit: de44bbfd9cf981baab181c006dc363c5f412d94c [4/9] bpf: Add helpers to dequeue from a PIFO map
config: sparc-defconfig (attached as .config)
compiler: sparc-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/toke/linux.git/commit/?id...
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke xdp-queueing-01
git checkout de44bbfd9cf981baab181c006dc363c5f412d94c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc
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 >>):
net/core/filter.c: In function 'xdp_do_redirect':
net/core/filter.c:3992:31: error: implicit declaration of function 'pifo_map_enqueue'; did you mean 'cpu_map_enqueue'? [-Werror=implicit-function-declaration]
3992 | err = pifo_map_enqueue(map, xdp, ri->tgt_index);
| ^~~~~~~~~~~~~~~~
| cpu_map_enqueue
net/core/filter.c: In function '____bpf_packet_dequeue':
>> net/core/filter.c:4153:31: error: implicit declaration of function 'pifo_map_dequeue' [-Werror=implicit-function-declaration]
4153 | return (unsigned long)pifo_map_dequeue(map, flags);
| ^~~~~~~~~~~~~~~~
net/core/filter.c: At top level:
net/core/filter.c:10088:35: error: 'bpf_prog_test_run_dequeue' undeclared here (not in a function); did you mean 'bpf_prog_test_run_syscall'?
10088 | .test_run = bpf_prog_test_run_dequeue,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_prog_test_run_syscall
cc1: some warnings being treated as errors
vim +/pifo_map_dequeue +4153 net/core/filter.c
3960
3961 int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp,
3962 struct bpf_prog *xdp_prog)
3963 {
3964 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
3965 enum bpf_map_type map_type = ri->map_type;
3966 void *fwd = ri->tgt_value;
3967 u32 map_id = ri->map_id;
3968 struct bpf_map *map;
3969 int err;
3970
3971 ri->map_id = 0; /* Valid map id idr range: [1,INT_MAX[ */
3972 ri->map_type = BPF_MAP_TYPE_UNSPEC;
3973
3974 switch (map_type) {
3975 case BPF_MAP_TYPE_DEVMAP:
3976 fallthrough;
3977 case BPF_MAP_TYPE_DEVMAP_HASH:
3978 map = READ_ONCE(ri->map);
3979 if (unlikely(map)) {
3980 WRITE_ONCE(ri->map, NULL);
3981 err = dev_map_enqueue_multi(xdp, dev, map,
3982 ri->flags & BPF_F_EXCLUDE_INGRESS);
3983 } else {
3984 err = dev_map_enqueue(fwd, xdp, dev);
3985 }
3986 break;
3987 case BPF_MAP_TYPE_PIFO:
3988 map = READ_ONCE(ri->map);
3989 if (unlikely(!map))
3990 err = -EINVAL;
3991 else
> 3992 err = pifo_map_enqueue(map, xdp, ri->tgt_index);
3993 break;
3994 case BPF_MAP_TYPE_CPUMAP:
3995 err = cpu_map_enqueue(fwd, xdp, dev);
3996 break;
3997 case BPF_MAP_TYPE_XSKMAP:
3998 err = __xsk_map_redirect(fwd, xdp);
3999 break;
4000 case BPF_MAP_TYPE_UNSPEC:
4001 if (map_id == INT_MAX) {
4002 fwd = dev_get_by_index_rcu(dev_net(dev), ri->tgt_index);
4003 if (unlikely(!fwd)) {
4004 err = -EINVAL;
4005 break;
4006 }
4007 err = dev_xdp_enqueue(fwd, xdp, dev);
4008 break;
4009 }
4010 fallthrough;
4011 default:
4012 err = -EBADRQC;
4013 }
4014
4015 if (unlikely(err))
4016 goto err;
4017
4018 _trace_xdp_redirect_map(dev, xdp_prog, fwd, map_type, map_id, ri->tgt_index);
4019 return 0;
4020 err:
4021 _trace_xdp_redirect_map_err(dev, xdp_prog, fwd, map_type, map_id, ri->tgt_index, err);
4022 return err;
4023 }
4024 EXPORT_SYMBOL_GPL(xdp_do_redirect);
4025
4026 static int xdp_do_generic_redirect_map(struct net_device *dev,
4027 struct sk_buff *skb,
4028 struct xdp_buff *xdp,
4029 struct bpf_prog *xdp_prog,
4030 void *fwd,
4031 enum bpf_map_type map_type, u32 map_id)
4032 {
4033 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
4034 struct bpf_map *map;
4035 int err;
4036
4037 switch (map_type) {
4038 case BPF_MAP_TYPE_DEVMAP:
4039 fallthrough;
4040 case BPF_MAP_TYPE_DEVMAP_HASH:
4041 map = READ_ONCE(ri->map);
4042 if (unlikely(map)) {
4043 WRITE_ONCE(ri->map, NULL);
4044 err = dev_map_redirect_multi(dev, skb, xdp_prog, map,
4045 ri->flags & BPF_F_EXCLUDE_INGRESS);
4046 } else {
4047 err = dev_map_generic_redirect(fwd, skb, xdp_prog);
4048 }
4049 if (unlikely(err))
4050 goto err;
4051 break;
4052 case BPF_MAP_TYPE_XSKMAP:
4053 err = xsk_generic_rcv(fwd, xdp);
4054 if (err)
4055 goto err;
4056 consume_skb(skb);
4057 break;
4058 case BPF_MAP_TYPE_CPUMAP:
4059 err = cpu_map_generic_redirect(fwd, skb);
4060 if (unlikely(err))
4061 goto err;
4062 break;
4063 default:
4064 err = -EBADRQC;
4065 goto err;
4066 }
4067
4068 _trace_xdp_redirect_map(dev, xdp_prog, fwd, map_type, map_id, ri->tgt_index);
4069 return 0;
4070 err:
4071 _trace_xdp_redirect_map_err(dev, xdp_prog, fwd, map_type, map_id, ri->tgt_index, err);
4072 return err;
4073 }
4074
4075 int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
4076 struct xdp_buff *xdp, struct bpf_prog *xdp_prog)
4077 {
4078 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
4079 enum bpf_map_type map_type = ri->map_type;
4080 void *fwd = ri->tgt_value;
4081 u32 map_id = ri->map_id;
4082 int err;
4083
4084 ri->map_id = 0; /* Valid map id idr range: [1,INT_MAX[ */
4085 ri->map_type = BPF_MAP_TYPE_UNSPEC;
4086
4087 if (map_type == BPF_MAP_TYPE_UNSPEC && map_id == INT_MAX) {
4088 fwd = dev_get_by_index_rcu(dev_net(dev), ri->tgt_index);
4089 if (unlikely(!fwd)) {
4090 err = -EINVAL;
4091 goto err;
4092 }
4093
4094 err = xdp_ok_fwd_dev(fwd, skb->len);
4095 if (unlikely(err))
4096 goto err;
4097
4098 skb->dev = fwd;
4099 _trace_xdp_redirect(dev, xdp_prog, ri->tgt_index);
4100 generic_xdp_tx(skb, xdp_prog);
4101 return 0;
4102 }
4103
4104 return xdp_do_generic_redirect_map(dev, skb, xdp, xdp_prog, fwd, map_type, map_id);
4105 err:
4106 _trace_xdp_redirect_err(dev, xdp_prog, ri->tgt_index, err);
4107 return err;
4108 }
4109
4110 BPF_CALL_2(bpf_xdp_redirect, u32, ifindex, u64, flags)
4111 {
4112 struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
4113
4114 if (unlikely(flags))
4115 return XDP_ABORTED;
4116
4117 /* NB! Map type UNSPEC and map_id == INT_MAX (never generated
4118 * by map_idr) is used for ifindex based XDP redirect.
4119 */
4120 ri->tgt_index = ifindex;
4121 ri->map_id = INT_MAX;
4122 ri->map_type = BPF_MAP_TYPE_UNSPEC;
4123
4124 return XDP_REDIRECT;
4125 }
4126
4127 static const struct bpf_func_proto bpf_xdp_redirect_proto = {
4128 .func = bpf_xdp_redirect,
4129 .gpl_only = false,
4130 .ret_type = RET_INTEGER,
4131 .arg1_type = ARG_ANYTHING,
4132 .arg2_type = ARG_ANYTHING,
4133 };
4134
4135 BPF_CALL_3(bpf_xdp_redirect_map, struct bpf_map *, map, u32, ifindex,
4136 u64, flags)
4137 {
4138 return map->ops->map_redirect(map, ifindex, flags);
4139 }
4140
4141 static const struct bpf_func_proto bpf_xdp_redirect_map_proto = {
4142 .func = bpf_xdp_redirect_map,
4143 .gpl_only = false,
4144 .ret_type = RET_INTEGER,
4145 .arg1_type = ARG_CONST_MAP_PTR,
4146 .arg2_type = ARG_ANYTHING,
4147 .arg3_type = ARG_ANYTHING,
4148 };
4149
4150 BPF_CALL_3(bpf_packet_dequeue, struct dequeue_data *, ctx, struct bpf_map *, map,
4151 u64, flags)
4152 {
> 4153 return (unsigned long)pifo_map_dequeue(map, flags);
4154 }
4155
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-common:android-4.14-stable 16585/25375] kernel/bpf/core.c:1532:34: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: 620d928acca50c8ba013554fc798dcf8b8910918
commit: 5179a6a673e1bff5b9823b1317c59127bacd4641 [16585/25375] UPSTREAM: bpf: permit multiple bpf attachments for a single perf event
config: i386-randconfig-s001-20211101 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.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 android-4.14-stable
git checkout 5179a6a673e1bff5b9823b1317c59127bacd4641
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
kernel/bpf/core.c:1095:43: sparse: sparse: arithmetics on pointers to functions
kernel/bpf/core.c:1514:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got void * @@
kernel/bpf/core.c:1514:31: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1514:31: sparse: got void *
kernel/bpf/core.c:1518:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got struct bpf_prog_array * @@
kernel/bpf/core.c:1518:17: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1518:17: sparse: got struct bpf_prog_array *
kernel/bpf/core.c:1526:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct callback_head *head @@ got struct callback_head [noderef] <asn:4> * @@
kernel/bpf/core.c:1526:9: sparse: expected struct callback_head *head
kernel/bpf/core.c:1526:9: sparse: got struct callback_head [noderef] <asn:4> *
>> kernel/bpf/core.c:1532:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct bpf_prog **prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1532:34: sparse: expected struct bpf_prog **prog
kernel/bpf/core.c:1532:34: sparse: got struct bpf_prog *[noderef] <asn:4> *
>> kernel/bpf/core.c:1555:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog **existing_prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1555:31: sparse: expected struct bpf_prog **existing_prog
kernel/bpf/core.c:1555:31: sparse: got struct bpf_prog *[noderef] <asn:4> *
>> kernel/bpf/core.c:1577:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog_array *array @@ got struct bpf_prog_array [noderef] <asn:4> * @@
kernel/bpf/core.c:1577:15: sparse: expected struct bpf_prog_array *array
kernel/bpf/core.c:1577:15: sparse: got struct bpf_prog_array [noderef] <asn:4> *
>> kernel/bpf/core.c:1583:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog **[assigned] existing_prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1583:31: sparse: expected struct bpf_prog **[assigned] existing_prog
kernel/bpf/core.c:1583:31: sparse: got struct bpf_prog *[noderef] <asn:4> *
kernel/bpf/core.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/bpf.h, ...):
include/trace/events/bpf.h:56:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:92:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:117:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:188:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:228:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:282:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:312:1: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/core.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/xdp.h, ...):
include/trace/events/xdp.h:28:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:53:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:111:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:126:1: sparse: sparse: Using plain integer as NULL pointer
vim +1532 kernel/bpf/core.c
1528
1529 void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs,
1530 struct bpf_prog *old_prog)
1531 {
> 1532 struct bpf_prog **prog = progs->progs;
1533
1534 for (; *prog; prog++)
1535 if (*prog == old_prog) {
1536 WRITE_ONCE(*prog, &dummy_bpf_prog.prog);
1537 break;
1538 }
1539 }
1540
1541 int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array,
1542 struct bpf_prog *exclude_prog,
1543 struct bpf_prog *include_prog,
1544 struct bpf_prog_array **new_array)
1545 {
1546 int new_prog_cnt, carry_prog_cnt = 0;
1547 struct bpf_prog **existing_prog;
1548 struct bpf_prog_array *array;
1549 int new_prog_idx = 0;
1550
1551 /* Figure out how many existing progs we need to carry over to
1552 * the new array.
1553 */
1554 if (old_array) {
> 1555 existing_prog = old_array->progs;
1556 for (; *existing_prog; existing_prog++) {
1557 if (*existing_prog != exclude_prog &&
1558 *existing_prog != &dummy_bpf_prog.prog)
1559 carry_prog_cnt++;
1560 if (*existing_prog == include_prog)
1561 return -EEXIST;
1562 }
1563 }
1564
1565 /* How many progs (not NULL) will be in the new array? */
1566 new_prog_cnt = carry_prog_cnt;
1567 if (include_prog)
1568 new_prog_cnt += 1;
1569
1570 /* Do we have any prog (not NULL) in the new array? */
1571 if (!new_prog_cnt) {
1572 *new_array = NULL;
1573 return 0;
1574 }
1575
1576 /* +1 as the end of prog_array is marked with NULL */
> 1577 array = bpf_prog_array_alloc(new_prog_cnt + 1, GFP_KERNEL);
1578 if (!array)
1579 return -ENOMEM;
1580
1581 /* Fill in the new prog array */
1582 if (carry_prog_cnt) {
> 1583 existing_prog = old_array->progs;
1584 for (; *existing_prog; existing_prog++)
1585 if (*existing_prog != exclude_prog &&
1586 *existing_prog != &dummy_bpf_prog.prog)
1587 array->progs[new_prog_idx++] = *existing_prog;
1588 }
1589 if (include_prog)
1590 array->progs[new_prog_idx++] = include_prog;
1591 array->progs[new_prog_idx] = NULL;
1592 *new_array = array;
1593 return 0;
1594 }
1595
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[aegl:dsa_page_zero_prototype 30/39] mm/page_alloc.c:167:14: error: 'engine_cleanup' defined but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git dsa_page_zero_prototype
head: 443bff56d346197a2f8c09c7159ebc9e7440429b
commit: 1cbda083dce71e5bcaeae60233ae5ed7eaa519b5 [30/39] mm/pagezero: Add page zero engine register/unregister functions
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/aegl/linux.git/commit/?id...
git remote add aegl https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
git fetch --no-tags aegl dsa_page_zero_prototype
git checkout 1cbda083dce71e5bcaeae60233ae5ed7eaa519b5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 >>):
mm/page_alloc.c:3785:15: error: no previous prototype for 'should_fail_alloc_page' [-Werror=missing-prototypes]
3785 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
>> mm/page_alloc.c:167:14: error: 'engine_cleanup' defined but not used [-Werror=unused-variable]
167 | static int (*engine_cleanup)(int node, void **v);
| ^~~~~~~~~~~~~~
>> mm/page_alloc.c:163:16: error: 'alloc_zone_private' defined but not used [-Werror=unused-variable]
163 | static void *(*alloc_zone_private)(int node);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/engine_cleanup +167 mm/page_alloc.c
162
> 163 static void *(*alloc_zone_private)(int node);
164 static int (*get_zero_pages)(void *private, int migratetype, int want,
165 struct list_head *l, int *countp);
166 static void (*provide_page)(void *v, struct page *page);
> 167 static int (*engine_cleanup)(int node, void **v);
168
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/soc/samsung/s3c-pm-debug.c:30:9: warning: function 's3c_pm_dbg' might be a candidate for 'gnu_printf' format attribute
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 17132da70eb766785b9b4677bacce18cc11ea442 ARM: samsung: move pm check code to drivers/soc
date: 1 year, 3 months ago
config: arm-randconfig-c023-20211025 (attached as .config)
compiler: arm-linux-gnueabi-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/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 17132da70eb766785b9b4677bacce18cc11ea442
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
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/soc/samsung/s3c-pm-debug.c: In function 's3c_pm_dbg':
>> drivers/soc/samsung/s3c-pm-debug.c:30:9: warning: function 's3c_pm_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
30 | vsnprintf(buff, sizeof(buff), fmt, va);
| ^~~~~~~~~
vim +30 drivers/soc/samsung/s3c-pm-debug.c
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 23
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 24 void s3c_pm_dbg(const char *fmt, ...)
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 25 {
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 26 va_list va;
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 27 char buff[256];
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 28
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 29 va_start(va, fmt);
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 @30 vsnprintf(buff, sizeof(buff), fmt, va);
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 31 va_end(va);
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 32
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 33 printascii(buff);
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 34 }
72551f6cf13e2f arch/arm/plat-samsung/pm-debug.c Tomasz Figa 2014-03-18 35
:::::: The code at line 30 was first introduced by commit
:::::: 72551f6cf13e2f3a1d273b7007b5d7d7fd69c554 ARM: SAMSUNG: Move Samsung PM debug code into separate file
:::::: TO: Tomasz Figa <t.figa(a)samsung.com>
:::::: CC: Kukjin Kim <kgene.kim(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[chrome-os:chromeos-5.10 75/90] drivers/net/wwan/t7xx/t7xx_modem_ops.c:581:6: error: no previous prototype for 'sap_hk_wq'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 5771b489676ac81acb2cb1c9d65927b52f45d632
commit: 6d360694559dc81c8004d32aec8bd41d2a6e2f1a [75/90] CHROMIUM: t7xx: Initial support for cldma0, sap, brom download port
config: microblaze-buildonly-randconfig-r006-20211108 (attached as .config)
compiler: microblaze-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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 6d360694559dc81c8004d32aec8bd41d2a6e2f1a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze
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 >>):
>> drivers/net/wwan/t7xx/t7xx_modem_ops.c:581:6: error: no previous prototype for 'sap_hk_wq' [-Werror=missing-prototypes]
581 | void sap_hk_wq(struct work_struct *work)
| ^~~~~~~~~
cc1: all warnings being treated as errors
vim +/sap_hk_wq +581 drivers/net/wwan/t7xx/t7xx_modem_ops.c
580
> 581 void sap_hk_wq(struct work_struct *work)
582 {
583 struct mtk_modem *md = container_of(work, struct mtk_modem, sap_handshake_work);
584 struct core_sys_info *core_info;
585 struct ccci_fsm_ctl *ctl = fsm_get_entry ();
586
587 core_info = &(md->core_sap);
588 fsm_clear_event(ctl, CCCI_EVENT_AP_HS2_EXIT);
589 cldma_switch_cfg(ID_CLDMA0, HIF_CFG_DEF);
590 cldma_start(ID_CLDMA0);
591 atomic_set(&core_info->handshake_ongoing, 1);
592 core_sap_handler(md, ctl, CCCI_EVENT_SAP_HS2, CCCI_EVENT_AP_HS2_EXIT);
593 }
594
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[chrome-os:chromeos-5.10 1/1] drivers/gpu/drm/evdi/evdi_gem.c:253:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: ae25dd46c5c2fecb4868af3a91418dea519deac9
commit: ae25dd46c5c2fecb4868af3a91418dea519deac9 [1/1] CHROMIUM: Import latest evdi driver
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout ae25dd46c5c2fecb4868af3a91418dea519deac9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
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/gpu/drm/evdi/evdi_gem.c: In function 'evdi_gem_vmap':
drivers/gpu/drm/evdi/evdi_gem.c:253:25: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
253 | obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
| ^~~~
| kmap
>> drivers/gpu/drm/evdi/evdi_gem.c:253:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
253 | obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
| ^
drivers/gpu/drm/evdi/evdi_gem.c: In function 'evdi_gem_vunmap':
drivers/gpu/drm/evdi/evdi_gem.c:274:17: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
274 | vunmap(obj->vmapping);
| ^~~~~~
| kunmap
cc1: some warnings being treated as errors
vim +253 drivers/gpu/drm/evdi/evdi_gem.c
3e21cedd503fab Aleksander Miera 2018-03-15 227
3e21cedd503fab Aleksander Miera 2018-03-15 228 int evdi_gem_vmap(struct evdi_gem_object *obj)
3e21cedd503fab Aleksander Miera 2018-03-15 229 {
3e21cedd503fab Aleksander Miera 2018-03-15 230 int page_count = obj->base.size / PAGE_SIZE;
3e21cedd503fab Aleksander Miera 2018-03-15 231 int ret;
3e21cedd503fab Aleksander Miera 2018-03-15 232
3e21cedd503fab Aleksander Miera 2018-03-15 233 if (obj->base.import_attach) {
79e3410df198df Sean Paul 2021-04-09 234 #if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
5d42c7b3d93d6c Sean Paul 2021-04-09 235 struct dma_buf_map map;
5d42c7b3d93d6c Sean Paul 2021-04-09 236
5d42c7b3d93d6c Sean Paul 2021-04-09 237 ret = dma_buf_vmap(obj->base.import_attach->dmabuf, &map);
5d42c7b3d93d6c Sean Paul 2021-04-09 238 if (ret)
5d42c7b3d93d6c Sean Paul 2021-04-09 239 return -ENOMEM;
5d42c7b3d93d6c Sean Paul 2021-04-09 240 obj->vmapping = map.vaddr;
5d42c7b3d93d6c Sean Paul 2021-04-09 241 #else
3e21cedd503fab Aleksander Miera 2018-03-15 242 obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf);
3e21cedd503fab Aleksander Miera 2018-03-15 243 if (!obj->vmapping)
3e21cedd503fab Aleksander Miera 2018-03-15 244 return -ENOMEM;
5d42c7b3d93d6c Sean Paul 2021-04-09 245 #endif
3e21cedd503fab Aleksander Miera 2018-03-15 246 return 0;
3e21cedd503fab Aleksander Miera 2018-03-15 247 }
3e21cedd503fab Aleksander Miera 2018-03-15 248
67442e0531eb83 Guenter Roeck 2020-11-04 249 ret = evdi_gem_get_pages(obj, GFP_KERNEL);
3e21cedd503fab Aleksander Miera 2018-03-15 250 if (ret)
3e21cedd503fab Aleksander Miera 2018-03-15 251 return ret;
3e21cedd503fab Aleksander Miera 2018-03-15 252
3e21cedd503fab Aleksander Miera 2018-03-15 @253 obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
3e21cedd503fab Aleksander Miera 2018-03-15 254 if (!obj->vmapping)
3e21cedd503fab Aleksander Miera 2018-03-15 255 return -ENOMEM;
3e21cedd503fab Aleksander Miera 2018-03-15 256 return 0;
3e21cedd503fab Aleksander Miera 2018-03-15 257 }
3e21cedd503fab Aleksander Miera 2018-03-15 258
:::::: The code at line 253 was first introduced by commit
:::::: 3e21cedd503fabd195cf407652bf87fd83e202ac drm/evdi: Add atomic evdi drm module
:::::: TO: Aleksander Miera <aleksander.miera(a)displaylink.com>
:::::: CC: Guenter Roeck <groeck(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week