tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b71af6f00ede58be00cb7306c9acb2660ec90947 commit: aeda8188894b2ed9ecf04dabaf5e147bce811725 [2544/2544] ub: change name in kconfig, and kconfig content of ub config: x86_64-randconfig-121-20241205 (https://download.01.org/0day-ci/archive/20241205/202412050919.gZc1zM8m-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412050919.gZc1zM8m-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412050919.gZc1zM8m-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) drivers/ub/urma/uburma/uburma_dev_ops.c: note: in included file (through include/linux/kernel.h, include/linux/list.h, include/linux/wait.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_dev_ops.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/linux/list.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_dev_ops.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/ub/urma/uburma/uburma_dev_ops.c:50:19: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/ub/urma/uburma/uburma_dev_ops.c:50:19: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_dev_ops.c:50:19: sparse: struct ubcore_device * drivers/ub/urma/uburma/uburma_dev_ops.c:71:9: sparse: sparse: incompatible types in comparison expression (different address spaces): drivers/ub/urma/uburma/uburma_dev_ops.c:71:9: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_dev_ops.c:71:9: sparse: struct ubcore_device * drivers/ub/urma/uburma/uburma_dev_ops.c:98:19: sparse: sparse: incompatible types in comparison expression (different address spaces): drivers/ub/urma/uburma/uburma_dev_ops.c:98:19: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_dev_ops.c:98:19: sparse: struct ubcore_device * -- drivers/ub/urma/uburma/uburma_event.c: note: in included file (through include/linux/kernel.h, include/asm-generic/bug.h, arch/x86/include/asm/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_event.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/asm-generic/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_event.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/ub/urma/uburma/uburma_event.c:102:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/ub/urma/uburma/uburma_event.c:102:20: sparse: void [noderef] __rcu * drivers/ub/urma/uburma/uburma_event.c:102:20: sparse: void * -- drivers/ub/urma/uburma/uburma_main.c: note: in included file (through include/linux/kernel.h, include/asm-generic/bug.h, arch/x86/include/asm/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_main.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/asm-generic/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_main.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/ub/urma/uburma/uburma_main.c:215:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/ub/urma/uburma/uburma_main.c:215:9: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_main.c:215:9: sparse: struct ubcore_device * drivers/ub/urma/uburma/uburma_main.c:239:9: sparse: sparse: incompatible types in comparison expression (different address spaces): drivers/ub/urma/uburma/uburma_main.c:239:9: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_main.c:239:9: sparse: struct ubcore_device * -- drivers/ub/urma/uburma/uburma_uobj.c: note: in included file (through include/linux/kernel.h): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_uobj.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_uobj.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/ub/urma/uburma/uburma_uobj.c:95:19: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/ub/urma/uburma/uburma_uobj.c:95:19: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_uobj.c:95:19: sparse: struct ubcore_device * drivers/ub/urma/uburma/uburma_uobj.c:396:19: sparse: sparse: incompatible types in comparison expression (different address spaces): drivers/ub/urma/uburma/uburma_uobj.c:396:19: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_uobj.c:396:19: sparse: struct ubcore_device * -- drivers/ub/urma/uburma/uburma_cmd.c: note: in included file (through include/linux/kernel.h, include/linux/list.h, include/linux/wait.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_cmd.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/linux/list.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/ub/urma/uburma/uburma_cmd.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/ub/urma/uburma/uburma_cmd.c:296:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/ub/urma/uburma/uburma_cmd.c:296:16: sparse: void [noderef] __rcu * drivers/ub/urma/uburma/uburma_cmd.c:296:16: sparse: void * drivers/ub/urma/uburma/uburma_cmd.c:1568:19: sparse: sparse: incompatible types in comparison expression (different address spaces): drivers/ub/urma/uburma/uburma_cmd.c:1568:19: sparse: struct ubcore_device [noderef] __rcu * drivers/ub/urma/uburma/uburma_cmd.c:1568:19: sparse: struct ubcore_device *
vim +50 drivers/ub/urma/uburma/uburma_dev_ops.c
cd637a6dded9c0 Yizhen Fan 2023-09-12 32 7d130c6018dbfd Yizhen Fan 2023-09-12 33 int uburma_mmap(struct file *filp, struct vm_area_struct *vma) 7d130c6018dbfd Yizhen Fan 2023-09-12 34 { 7d130c6018dbfd Yizhen Fan 2023-09-12 35 struct uburma_file *file = filp->private_data; 7d130c6018dbfd Yizhen Fan 2023-09-12 36 struct uburma_device *ubu_dev; 7d130c6018dbfd Yizhen Fan 2023-09-12 37 struct ubcore_device *ubc_dev; 7d130c6018dbfd Yizhen Fan 2023-09-12 38 int srcu_idx; 7d130c6018dbfd Yizhen Fan 2023-09-12 39 int ret; 7d130c6018dbfd Yizhen Fan 2023-09-12 40 7d130c6018dbfd Yizhen Fan 2023-09-12 41 if (file == NULL || file->ucontext == NULL) { 7d130c6018dbfd Yizhen Fan 2023-09-12 42 uburma_log_err("can not find ucontext.\n"); 7d130c6018dbfd Yizhen Fan 2023-09-12 43 return -EINVAL; 7d130c6018dbfd Yizhen Fan 2023-09-12 44 } 7d130c6018dbfd Yizhen Fan 2023-09-12 45 7d130c6018dbfd Yizhen Fan 2023-09-12 46 ubu_dev = file->ubu_dev; 7d130c6018dbfd Yizhen Fan 2023-09-12 47 uburma_cmd_inc(ubu_dev); 7d130c6018dbfd Yizhen Fan 2023-09-12 48 7d130c6018dbfd Yizhen Fan 2023-09-12 49 srcu_idx = srcu_read_lock(&ubu_dev->ubc_dev_srcu); 7d130c6018dbfd Yizhen Fan 2023-09-12 @50 ubc_dev = srcu_dereference(ubu_dev->ubc_dev, &ubu_dev->ubc_dev_srcu); 7d130c6018dbfd Yizhen Fan 2023-09-12 51 if (ubc_dev == NULL || ubc_dev->ops == NULL || ubc_dev->ops->mmap == NULL) { 7d130c6018dbfd Yizhen Fan 2023-09-12 52 uburma_log_err("can not find ubcore device.\n"); 7d130c6018dbfd Yizhen Fan 2023-09-12 53 ret = -ENODEV; 7d130c6018dbfd Yizhen Fan 2023-09-12 54 goto out; 7d130c6018dbfd Yizhen Fan 2023-09-12 55 } 7d130c6018dbfd Yizhen Fan 2023-09-12 56 7d130c6018dbfd Yizhen Fan 2023-09-12 57 ret = ubc_dev->ops->mmap(file->ucontext, vma); 7d130c6018dbfd Yizhen Fan 2023-09-12 58 7d130c6018dbfd Yizhen Fan 2023-09-12 59 out: 7d130c6018dbfd Yizhen Fan 2023-09-12 60 srcu_read_unlock(&ubu_dev->ubc_dev_srcu, srcu_idx); 7d130c6018dbfd Yizhen Fan 2023-09-12 61 uburma_cmd_dec(ubu_dev); 7d130c6018dbfd Yizhen Fan 2023-09-12 62 return ret; 7d130c6018dbfd Yizhen Fan 2023-09-12 63 } 7d130c6018dbfd Yizhen Fan 2023-09-12 64
:::::: The code at line 50 was first introduced by commit :::::: 7d130c6018dbfd09c6e1c5d91b347fdbf3924321 ub: add mmap ops support in ubcore and uburma
:::::: TO: Yizhen Fan fanyizhen@huawei.com :::::: CC: fanyizhen1995 en_0015767@163.com