lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202312042226.NQmCRdOG-lkp@intel.com>
Date:   Mon, 4 Dec 2023 22:12:32 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Subject: drivers/spi/spi-lp8841-rtc.c:112:17: sparse: sparse: incorrect type
 in argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   3 years, 3 months ago
config: sh-randconfig-r133-20231118 (https://download.01.org/0day-ci/archive/20231204/202312042226.NQmCRdOG-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231204/202312042226.NQmCRdOG-lkp@intel.com/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
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312042226.NQmCRdOG-lkp@intel.com/

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

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@...il.com>
:::::: CC: Mark Brown <broonie@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ