drivers/spi/spi-lp8841-rtc.c:112:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
From: kernel test robot
Date: Tue May 11 2021 - 04:53:57 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 9 months ago
config: sh-randconfig-s032-20210511 (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__' W=1 ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-lp8841-rtc.c:112:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:112:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:112:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *iomem @@ got void [noderef] __iomem * @@
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: expected void *iomem
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: got void [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: expected void const [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: expected void const [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
--
drivers/vhost/scsi.c:1697:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user *eventsp @@
drivers/vhost/scsi.c:1697:21: sparse: expected unsigned int const *__gu_addr
drivers/vhost/scsi.c:1697:21: sparse: got unsigned int [noderef] [usertype] __user *eventsp
>> drivers/vhost/scsi.c:1697:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/vhost/scsi.c:1697:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/scsi.c:1697:21: sparse: got unsigned int const *__gu_addr
--
drivers/vhost/vhost.c:1571:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user *idxp @@
drivers/vhost/vhost.c:1571:13: sparse: expected unsigned int const *__gu_addr
drivers/vhost/vhost.c:1571:13: sparse: got unsigned int [noderef] [usertype] __user *idxp
>> drivers/vhost/vhost.c:1571:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/vhost/vhost.c:1571:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/vhost.c:1571:13: sparse: got unsigned int const *__gu_addr
drivers/vhost/vhost.c:1771:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/vhost/vhost.c:1771:21: sparse: expected int const *__gu_addr
drivers/vhost/vhost.c:1771:21: sparse: got int [noderef] __user *
>> drivers/vhost/vhost.c:1771:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/vhost/vhost.c:1771:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/vhost.c:1771:21: sparse: got int const *__gu_addr
--
sound/soc/uniphier/aio-compress.c:295:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
sound/soc/uniphier/aio-compress.c:295:23: sparse: expected unsigned int const *__gu_addr
sound/soc/uniphier/aio-compress.c:295:23: sparse: got unsigned int [noderef] [usertype] __user *
>> sound/soc/uniphier/aio-compress.c:295:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
sound/soc/uniphier/aio-compress.c:295:23: sparse: expected void const volatile [noderef] __user *ptr
sound/soc/uniphier/aio-compress.c:295:23: sparse: got unsigned int const *__gu_addr
sound/soc/uniphier/aio-compress.c:309:34: sparse: sparse: cast to restricted __be16
sound/soc/uniphier/aio-compress.c:309:34: sparse: sparse: cast to restricted __be16
sound/soc/uniphier/aio-compress.c:309:34: sparse: sparse: cast to restricted __be16
sound/soc/uniphier/aio-compress.c:309:34: sparse: sparse: cast to restricted __be16
vim +112 drivers/spi/spi-lp8841-rtc.c
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 97
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 98 static int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 99 spi_lp8841_rtc_transfer_one(struct spi_master *master,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 100 struct spi_device *spi,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 101 struct spi_transfer *t)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 102 {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 103 struct spi_lp8841_rtc *data = spi_master_get_devdata(master);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 104 unsigned count = t->len;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 105 const u8 *tx = t->tx_buf;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 106 u8 *rx = t->rx_buf;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 107 u8 word = 0;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 108 int ret = 0;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 109
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 110 if (tx) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 111 data->state &= ~SPI_LP8841_RTC_nWE;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @112 writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 113 while (likely(count > 0)) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 114 word = *tx++;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 115 bitbang_txrx_be_cpha0_lsb(data, 1, 0,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 116 SPI_MASTER_NO_RX, word, 8);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 117 count--;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 118 }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 119 } else if (rx) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 120 data->state |= SPI_LP8841_RTC_nWE;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 121 writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 122 while (likely(count > 0)) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 123 word = bitbang_txrx_be_cpha0_lsb(data, 1, 0,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 124 SPI_MASTER_NO_TX, word, 8);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 125 *rx++ = word;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 126 count--;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 127 }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 128 } else {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 129 ret = -EINVAL;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 130 }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 131
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 132 spi_finalize_current_transfer(master);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 133
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 134 return ret;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 135 }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 136
:::::: The code at line 112 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841
:::::: TO: Sergei Ianovich <ynvich@xxxxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip