arch/arc/include/asm/uaccess.h:592:33: sparse: sparse: incorrect type in initializer (different address spaces)
From: kernel test robot
Date: Tue Jun 02 2026 - 08:58:15 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6f3ed7fec72fc8979b2a8c7219c0a9fcfc8d07b5
commit: 9eb22f7fedfc9eb1b7f431a5359abd4d15b0b0cd fs: add ioctl to query metadata and protection info capabilities
date: 11 months ago
config: arc-randconfig-r113-20260602 (https://download.01.org/0day-ci/archive/20260602/202606022029.i60LMcVJ-lkp@xxxxxxxxx/config)
compiler: arc-linux-gcc (GCC) 15.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260602/202606022029.i60LMcVJ-lkp@xxxxxxxxx/reproduce)
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
| Fixes: 9eb22f7fedfc ("fs: add ioctl to query metadata and protection info capabilities")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606022029.i60LMcVJ-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
block/blk-integrity.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...):
>> arch/arc/include/asm/uaccess.h:592:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *d_char @@ got void [noderef] __user *to @@
arch/arc/include/asm/uaccess.h:592:33: sparse: expected unsigned char *d_char
arch/arc/include/asm/uaccess.h:592:33: sparse: got void [noderef] __user *to
vim +592 arch/arc/include/asm/uaccess.h
43697cb0973da1 Vineet Gupta 2013-01-18 588
80bfe134f0306a Vineet Gupta 2021-08-13 589 static inline unsigned long __clear_user(void __user *to, unsigned long n)
43697cb0973da1 Vineet Gupta 2013-01-18 590 {
43697cb0973da1 Vineet Gupta 2013-01-18 591 long res = n;
43697cb0973da1 Vineet Gupta 2013-01-18 @592 unsigned char *d_char = to;
43697cb0973da1 Vineet Gupta 2013-01-18 593
43697cb0973da1 Vineet Gupta 2013-01-18 594 __asm__ __volatile__(
43697cb0973da1 Vineet Gupta 2013-01-18 595 " bbit0 %0, 0, 1f \n"
43697cb0973da1 Vineet Gupta 2013-01-18 596 "75: stb.ab %2, [%0,1] \n"
43697cb0973da1 Vineet Gupta 2013-01-18 597 " sub %1, %1, 1 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 598 "1: bbit0 %0, 1, 2f \n"
43697cb0973da1 Vineet Gupta 2013-01-18 599 "76: stw.ab %2, [%0,2] \n"
43697cb0973da1 Vineet Gupta 2013-01-18 600 " sub %1, %1, 2 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 601 "2: asr.f lp_count, %1, 2 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 602 " lpnz 3f \n"
43697cb0973da1 Vineet Gupta 2013-01-18 603 "77: st.ab %2, [%0,4] \n"
43697cb0973da1 Vineet Gupta 2013-01-18 604 " sub %1, %1, 4 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 605 "3: bbit0 %1, 1, 4f \n"
43697cb0973da1 Vineet Gupta 2013-01-18 606 "78: stw.ab %2, [%0,2] \n"
43697cb0973da1 Vineet Gupta 2013-01-18 607 " sub %1, %1, 2 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 608 "4: bbit0 %1, 0, 5f \n"
43697cb0973da1 Vineet Gupta 2013-01-18 609 "79: stb.ab %2, [%0,1] \n"
43697cb0973da1 Vineet Gupta 2013-01-18 610 " sub %1, %1, 1 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 611 "5: \n"
43697cb0973da1 Vineet Gupta 2013-01-18 612 " .section .fixup, \"ax\" \n"
43697cb0973da1 Vineet Gupta 2013-01-18 613 " .align 4 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 614 "3: j 5b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 615 " .previous \n"
43697cb0973da1 Vineet Gupta 2013-01-18 616 " .section __ex_table, \"a\" \n"
43697cb0973da1 Vineet Gupta 2013-01-18 617 " .align 4 \n"
43697cb0973da1 Vineet Gupta 2013-01-18 618 " .word 75b, 3b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 619 " .word 76b, 3b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 620 " .word 77b, 3b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 621 " .word 78b, 3b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 622 " .word 79b, 3b \n"
43697cb0973da1 Vineet Gupta 2013-01-18 623 " .previous \n"
43697cb0973da1 Vineet Gupta 2013-01-18 624 : "+r"(d_char), "+r"(res)
43697cb0973da1 Vineet Gupta 2013-01-18 625 : "i"(0)
d5e3c55e01d8b1 Vineet Gupta 2019-02-05 626 : "lp_count", "memory");
43697cb0973da1 Vineet Gupta 2013-01-18 627
43697cb0973da1 Vineet Gupta 2013-01-18 628 return res;
43697cb0973da1 Vineet Gupta 2013-01-18 629 }
43697cb0973da1 Vineet Gupta 2013-01-18 630
:::::: The code at line 592 was first introduced by commit
:::::: 43697cb0973da144156e7d11ddd035aee226ee30 ARC: uaccess friends
:::::: TO: Vineet Gupta <vgupta@xxxxxxxxxxxx>
:::::: CC: Vineet Gupta <vgupta@xxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki