linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-06-24  1:38 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-06-24  1:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 6732 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7426cedc7dad67bf3c71ea6cc29ab7822e1a453f
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   10 months ago
config: alpha-randconfig-s031-20210624 (attached as .config)
compiler: alpha-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=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=alpha 

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 >>)
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23  59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  65  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27961 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-08-07  0:24 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-08-07  0:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4d1044fcb996e8de9b9ab392f4a767890e45202d
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   2 years ago
config: alpha-randconfig-s041-20220806 (https://download.01.org/0day-ci/archive/20220807/202208070805.j8BM5XMV-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/spi/

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

sparse warnings: (new ones prefixed by >>)
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23   59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   65  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   66  static inline u32
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   67  bitbang_txrx_be_cpha0_lsb(struct spi_lp8841_rtc *data,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   68  		unsigned usecs, unsigned cpol, unsigned flags,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   69  		u32 word, u8 bits)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   70  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   71  	/* if (cpol == 0) this is SPI_MODE_0; else this is SPI_MODE_2 */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   72  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   73  	u32 shift = 32 - bits;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   74  	/* clock starts at inactive polarity */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   75  	for (; likely(bits); bits--) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   76  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   77  		/* setup LSB (to slave) on leading edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   78  		if ((flags & SPI_MASTER_NO_TX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   79  			setmosi(data, (word & 1));
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   80  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   81  		usleep_range(usecs, usecs + 1);	/* T(setup) */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   82  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   83  		/* sample LSB (from slave) on trailing edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   84  		word >>= 1;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   85  		if ((flags & SPI_MASTER_NO_RX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   86  			word |= (getmiso(data) << 31);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   87  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   88  		setsck(data, !cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   89  		usleep_range(usecs, usecs + 1);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   90  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   91  		setsck(data, cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   92  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   93  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   94  	word >>= shift;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   95  	return word;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   96  }
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  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  137  static void
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  138  spi_lp8841_rtc_set_cs(struct spi_device *spi, bool enable)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  139  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  140  	struct spi_lp8841_rtc *data = spi_master_get_devdata(spi->master);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  141  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  142  	data->state = 0;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  143  	writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  144  	if (enable) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  145  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  146  		data->state |= SPI_LP8841_RTC_CE;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @147  		writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  148  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  149  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  150  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  151  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-01-17 20:16 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-01-17 20:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0c947b893d69231a9add855939da7c66237ab44f
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   1 year, 5 months ago
config: alpha-randconfig-s031-20220117 (https://download.01.org/0day-ci/archive/20220118/202201180418.XVpvcyjG-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/pci/controller/ drivers/spi/

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 >>)
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23  59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  65  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-05-10 11:09 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-05-10 11:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 12777 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6efb943b8616ec53a5e444193dccf1af9ad627b5
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   9 months ago
config: alpha-randconfig-s032-20210510 (attached as .config)
compiler: alpha-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=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=alpha 

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 >>)
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23   59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   65  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   66  static inline u32
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   67  bitbang_txrx_be_cpha0_lsb(struct spi_lp8841_rtc *data,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   68  		unsigned usecs, unsigned cpol, unsigned flags,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   69  		u32 word, u8 bits)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   70  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   71  	/* if (cpol == 0) this is SPI_MODE_0; else this is SPI_MODE_2 */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   72  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   73  	u32 shift = 32 - bits;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   74  	/* clock starts at inactive polarity */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   75  	for (; likely(bits); bits--) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   76  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   77  		/* setup LSB (to slave) on leading edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   78  		if ((flags & SPI_MASTER_NO_TX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   79  			setmosi(data, (word & 1));
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   80  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   81  		usleep_range(usecs, usecs + 1);	/* T(setup) */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   82  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   83  		/* sample LSB (from slave) on trailing edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   84  		word >>= 1;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   85  		if ((flags & SPI_MASTER_NO_RX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   86  			word |= (getmiso(data) << 31);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   87  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   88  		setsck(data, !cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   89  		usleep_range(usecs, usecs + 1);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   90  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   91  		setsck(data, cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   92  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   93  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   94  	word >>= shift;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   95  	return word;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   96  }
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  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  137  static void
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  138  spi_lp8841_rtc_set_cs(struct spi_device *spi, bool enable)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  139  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  140  	struct spi_lp8841_rtc *data = spi_master_get_devdata(spi->master);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  141  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  142  	data->state = 0;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  143  	writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  144  	if (enable) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  145  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  146  		data->state |= SPI_LP8841_RTC_CE;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @147  		writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  148  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  149  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  150  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  151  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36334 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-01-14  3:40 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-01-14  3:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 11019 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   5 months ago
config: alpha-randconfig-s032-20210113 (attached as .config)
compiler: alpha-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-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=alpha 

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 >>)"
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
--
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] uid_hi @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse:     expected unsigned short [usertype] uid_hi
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse:     got restricted __be16 [usertype]
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int [usertype] uid_lo @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse:     expected unsigned int [usertype] uid_lo
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned short [usertype] seqid @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse:     expected unsigned short [usertype] seqid
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse:     got restricted __be16 [usertype]
>> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got void *reg @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse:     expected void const [noderef] __iomem *addr
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse:     got void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse:     got unsigned int [noderef] __iomem *

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb331 Sergei Ianovich 2016-02-23  59  
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  60  static inline int
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  62  {
7ecbfff6711fb331 Sergei Ianovich 2016-02-23 @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  64  }
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  65  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38103 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-01-13  7:27 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-01-13  7:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 11019 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e609571b5ffa3528bf85292de1ceaddac342bc1c
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   5 months ago
config: alpha-randconfig-s032-20210113 (attached as .config)
compiler: alpha-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-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=alpha 

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 >>)"
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
--
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] uid_hi @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse:     expected unsigned short [usertype] uid_hi
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse:     got restricted __be16 [usertype]
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int [usertype] uid_lo @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse:     expected unsigned int [usertype] uid_lo
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned short [usertype] seqid @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse:     expected unsigned short [usertype] seqid
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse:     got restricted __be16 [usertype]
>> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got void *reg @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse:     expected void const [noderef] __iomem *addr
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse:     got void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse:     got unsigned int [noderef] __iomem *
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *reg @@     got unsigned int [noderef] __iomem * @@
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse:     expected void *reg
   drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse:     got unsigned int [noderef] __iomem *

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb331 Sergei Ianovich 2016-02-23  59  
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  60  static inline int
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  62  {
7ecbfff6711fb331 Sergei Ianovich 2016-02-23 @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  64  }
7ecbfff6711fb331 Sergei Ianovich 2016-02-23  65  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38103 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-11-21 18:43 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-11-21 18:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Geert Uytterhoeven, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 20505 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   27bba9c532a8d21050b94224ffd310ad0058c353
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date:   3 months ago
config: alpha-randconfig-s032-20201122 (attached as .config)
compiler: alpha-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-134-gb59dbdaf-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
        # 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=alpha 

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 >>)"
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: 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 *addr @@     got void *iomem @@
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void const [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
--
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:264:21: sparse:     got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:264:21: sparse:     got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:264:21: sparse:     got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:264:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:268:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:286:6: sparse: sparse: symbol 'qe_uart_set_mctrl' was not declared. Should it be static?
   drivers/tty/serial/ucc_uart.c:347:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:347:17: sparse:     expected void [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:347:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:348:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     expected void [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:348:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:350:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:350:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:350:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:350:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:350:21: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:369:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:369:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:369:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:369:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:369:18: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:382:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:382:17: sparse:     expected void [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:382:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:383:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:383:17: sparse:     expected void const [noderef] __iomem *addr
   drivers/tty/serial/ucc_uart.c:383:17: sparse:     got restricted __be16 *
   drivers/tty/serial/ucc_uart.c:383:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem *addr @@     got restricted __be16 * @@
   drivers/tty/serial/ucc_uart.c:383:17: sparse:     expected void const [noderef] __iomem *addr

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23  59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  65  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25563 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-03  7:16 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-03  7:16 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 12248 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cdd3bb54332f82295ed90cd0c09c78cd0c0ee822
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   2 weeks ago
config: i386-randconfig-s001-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-3-gfa153962-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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 >>)

   drivers/spi/spi-lp8841-rtc.c:112:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:112:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:121:41: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:143:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:147:41: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:147:41: 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:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     got void *iomem
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *iomem @@
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void [noderef] __iomem *
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:57:33: sparse:     got void *iomem
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *iomem @@
>> drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     expected void [noderef] __iomem *
   drivers/spi/spi-lp8841-rtc.c:63:28: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *iomem @@
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/spi/spi-lp8841-rtc.c:47:33: sparse:     got void *iomem

vim +63 drivers/spi/spi-lp8841-rtc.c

7ecbfff6711fb3 Sergei Ianovich 2016-02-23   59  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   60  static inline int
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   61  getmiso(struct spi_lp8841_rtc *data)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   62  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  @63  	return ioread8(data->iomem) & SPI_LP8841_RTC_MISO;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   64  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   65  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   66  static inline u32
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   67  bitbang_txrx_be_cpha0_lsb(struct spi_lp8841_rtc *data,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   68  		unsigned usecs, unsigned cpol, unsigned flags,
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   69  		u32 word, u8 bits)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   70  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   71  	/* if (cpol == 0) this is SPI_MODE_0; else this is SPI_MODE_2 */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   72  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   73  	u32 shift = 32 - bits;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   74  	/* clock starts at inactive polarity */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   75  	for (; likely(bits); bits--) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   76  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   77  		/* setup LSB (to slave) on leading edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   78  		if ((flags & SPI_MASTER_NO_TX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   79  			setmosi(data, (word & 1));
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   80  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   81  		usleep_range(usecs, usecs + 1);	/* T(setup) */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   82  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   83  		/* sample LSB (from slave) on trailing edge */
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   84  		word >>= 1;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   85  		if ((flags & SPI_MASTER_NO_RX) == 0)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   86  			word |= (getmiso(data) << 31);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   87  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   88  		setsck(data, !cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   89  		usleep_range(usecs, usecs + 1);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   90  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   91  		setsck(data, cpol);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   92  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   93  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   94  	word >>= shift;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   95  	return word;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23   96  }
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  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  137  static void
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  138  spi_lp8841_rtc_set_cs(struct spi_device *spi, bool enable)
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  139  {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  140  	struct spi_lp8841_rtc *data = spi_master_get_devdata(spi->master);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  141  
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  142  	data->state = 0;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  143  	writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  144  	if (enable) {
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  145  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  146  		data->state |= SPI_LP8841_RTC_CE;
7ecbfff6711fb3 Sergei Ianovich 2016-02-23 @147  		writeb(data->state, data->iomem);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  148  		usleep_range(4, 5);
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  149  	}
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  150  }
7ecbfff6711fb3 Sergei Ianovich 2016-02-23  151  

:::::: The code at line 63 was first introduced by commit
:::::: 7ecbfff6711fb331591003ac32c002ce55a0758f spi: master driver to enable RTC on ICPDAS LP-8841

:::::: TO: Sergei Ianovich <ynvich@gmail.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40025 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-07  0:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24  1:38 drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-08-07  0:24 kernel test robot
2022-01-17 20:16 kernel test robot
2021-05-10 11:09 kernel test robot
2021-01-14  3:40 kernel test robot
2021-01-13  7:27 kernel test robot
2020-11-21 18:43 kernel test robot
2020-07-03  7:16 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).