lkml.org 
[lkml]   [2021]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/sh/kernel/cpu/adc.c:22:15: sparse: sparse: incorrect type in argument 1 (different base types)
Hi Luc,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 349a2d52ffe59b7a0c5876fa7ee9f3eaf188b830
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 10 months ago
config: sh-randconfig-s032-20210630 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> arch/sh/kernel/cpu/adc.c:22:15: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:22:15: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:22:15: sparse: got unsigned int
arch/sh/kernel/cpu/adc.c:24:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:24:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:24:9: sparse: got unsigned int
arch/sh/kernel/cpu/adc.c:27:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:27:23: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:27:23: sparse: got unsigned int
arch/sh/kernel/cpu/adc.c:31:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:31:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:31:9: sparse: got unsigned int
arch/sh/kernel/cpu/adc.c:33:19: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:33:19: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:33:19: sparse: got unsigned int
arch/sh/kernel/cpu/adc.c:34:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/adc.c:34:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/adc.c:34:17: sparse: got unsigned int
--
>> arch/sh/kernel/cpu/sh3/serial-sh770x.c:15:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:15:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:15:16: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/serial-sh770x.c:17:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:17:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:17:9: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/serial-sh770x.c:21:24: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:21:24: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:21:24: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/serial-sh770x.c:24:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:24:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:24:17: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/serial-sh770x.c:26:24: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:26:24: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:26:24: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/serial-sh770x.c:28:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/serial-sh770x.c:28:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh770x.c:28:17: sparse: got unsigned int
--
drivers/infiniband/core/uverbs_main.c:629:31: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long const *__gu_addr @@ got unsigned long long const [noderef] [usertype] __user * @@
drivers/infiniband/core/uverbs_main.c:629:31: sparse: expected unsigned long long const *__gu_addr
drivers/infiniband/core/uverbs_main.c:629:31: sparse: got unsigned long long const [noderef] [usertype] __user *
>> drivers/infiniband/core/uverbs_main.c:629:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long const *__gu_addr @@
drivers/infiniband/core/uverbs_main.c:629:31: sparse: expected void const volatile [noderef] __user *ptr
drivers/infiniband/core/uverbs_main.c:629:31: sparse: got unsigned long long const *__gu_addr
--
drivers/usb/gadget/udc/mv_udc_core.c:66:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le16 [usertype] wMaxPacketSize @@ got int @@
drivers/usb/gadget/udc/mv_udc_core.c:66:33: sparse: expected restricted __le16 [usertype] wMaxPacketSize
drivers/usb/gadget/udc/mv_udc_core.c:66:33: sparse: got int
drivers/usb/gadget/udc/mv_udc_core.c:366:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] buff_ptr0 @@ got restricted __le32 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:366:24: sparse: expected unsigned int [usertype] buff_ptr0
drivers/usb/gadget/udc/mv_udc_core.c:366:24: sparse: got restricted __le32 [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:368:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] buff_ptr1 @@ got restricted __le32 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:368:24: sparse: expected unsigned int [usertype] buff_ptr1
drivers/usb/gadget/udc/mv_udc_core.c:368:24: sparse: got restricted __le32 [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:369:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] buff_ptr2 @@ got restricted __le32 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:369:24: sparse: expected unsigned int [usertype] buff_ptr2
drivers/usb/gadget/udc/mv_udc_core.c:369:24: sparse: got restricted __le32 [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:370:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] buff_ptr3 @@ got restricted __le32 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:370:24: sparse: expected unsigned int [usertype] buff_ptr3
drivers/usb/gadget/udc/mv_udc_core.c:370:24: sparse: got restricted __le32 [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:371:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] buff_ptr4 @@ got restricted __le32 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:371:24: sparse: expected unsigned int [usertype] buff_ptr4
drivers/usb/gadget/udc/mv_udc_core.c:371:24: sparse: got restricted __le32 [usertype]
>> drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: got unsigned int *
>> drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/usb/gadget/udc/mv_udc_core.c:832:17: sparse: got unsigned int *
drivers/usb/gadget/udc/mv_udc_core.c:1455:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
drivers/usb/gadget/udc/mv_udc_core.c:1455:41: sparse: expected unsigned short [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:1455:41: sparse: got restricted __le16 [usertype]
drivers/usb/gadget/udc/mv_udc_core.c:1515:26: sparse: sparse: cast from restricted __le16
drivers/usb/gadget/udc/mv_udc_core.c:1545:31: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1546:35: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1567:30: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1578:39: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1579:43: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1615:34: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1624:52: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1610:30: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1610:30: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1633:39: sparse: sparse: restricted __le16 degrades to integer
drivers/usb/gadget/udc/mv_udc_core.c:1634:43: sparse: sparse: restricted __le16 degrades to integer

vim +22 arch/sh/kernel/cpu/adc.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 11
^1da177e4c3f41 Linus Torvalds 2005-04-16 12
^1da177e4c3f41 Linus Torvalds 2005-04-16 13 int adc_single(unsigned int channel)
^1da177e4c3f41 Linus Torvalds 2005-04-16 14 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 15 int off;
^1da177e4c3f41 Linus Torvalds 2005-04-16 16 unsigned char csr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 17
^1da177e4c3f41 Linus Torvalds 2005-04-16 18 if (channel >= 8) return -1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 19
^1da177e4c3f41 Linus Torvalds 2005-04-16 20 off = (channel & 0x03) << 2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 21
9d56dd3b083a3b Paul Mundt 2010-01-26 @22 csr = __raw_readb(ADCSR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 23 csr = channel | ADCSR_ADST | ADCSR_CKS;
9d56dd3b083a3b Paul Mundt 2010-01-26 24 __raw_writeb(csr, ADCSR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 25
^1da177e4c3f41 Linus Torvalds 2005-04-16 26 do {
9d56dd3b083a3b Paul Mundt 2010-01-26 27 csr = __raw_readb(ADCSR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 28 } while ((csr & ADCSR_ADF) == 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 29
^1da177e4c3f41 Linus Torvalds 2005-04-16 30 csr &= ~(ADCSR_ADF | ADCSR_ADST);
9d56dd3b083a3b Paul Mundt 2010-01-26 31 __raw_writeb(csr, ADCSR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 32
9d56dd3b083a3b Paul Mundt 2010-01-26 33 return (((__raw_readb(ADDRAH + off) << 8) |
9d56dd3b083a3b Paul Mundt 2010-01-26 34 __raw_readb(ADDRAL + off)) >> 6);
^1da177e4c3f41 Linus Torvalds 2005-04-16 35 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 36

:::::: The code at line 22 was first introduced by commit
:::::: 9d56dd3b083a3bec56e9da35ce07baca81030b03 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.

:::::: TO: Paul Mundt <lethal@linux-sh.org>
:::::: CC: Paul Mundt <lethal@linux-sh.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-06-30 03:41    [W:0.063 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site