[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107240631.CVyHH2Oc-lkp@intel.com>
Date: Sat, 24 Jul 2021 06:10:43 +0800
From: kernel test robot <lkp@...el.com>
To: Greg Ungerer <gerg@...ux-m68k.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: drivers/spi/spi-orion.c:413:17: sparse: sparse: incorrect type in
assignment (different base types)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 704f4cba43d4ed31ef4beb422313f1263d87bc55
commit: 005b73d0dd83c9cb9420a196bea8070cde30ecac m68knommu: __force type casts for raw IO access
date: 12 months ago
config: m68k-randconfig-s032-20210719 (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.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=005b73d0dd83c9cb9420a196bea8070cde30ecac
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 005b73d0dd83c9cb9420a196bea8070cde30ecac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-orion.c:413:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int volatile [usertype] @@ got restricted __le16 [usertype] @@
drivers/spi/spi-orion.c:413:17: sparse: expected unsigned int volatile [usertype]
drivers/spi/spi-orion.c:413:17: sparse: got restricted __le16 [usertype]
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
drivers/spi/spi-orion.c:423:17: sparse: sparse: cast to restricted __le16
vim +413 drivers/spi/spi-orion.c
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 396
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 397 static inline int
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 398 orion_spi_write_read_16bit(struct spi_device *spi,
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 399 const u16 **tx_buf, u16 **rx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 400 {
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 401 void __iomem *tx_reg, *rx_reg, *int_reg;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 402 struct orion_spi *orion_spi;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 403
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 404 orion_spi = spi_master_get_devdata(spi->master);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 405 tx_reg = spi_reg(orion_spi, ORION_SPI_DATA_OUT_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 406 rx_reg = spi_reg(orion_spi, ORION_SPI_DATA_IN_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 407 int_reg = spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 408
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 409 /* clear the interrupt cause register */
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 410 writel(0x0, int_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 411
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 412 if (tx_buf && *tx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 @413 writel(__cpu_to_le16(get_unaligned((*tx_buf)++)), tx_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 414 else
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 415 writel(0, tx_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 416
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 417 if (orion_spi_wait_till_ready(orion_spi) < 0) {
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 418 dev_err(&spi->dev, "TXS timed out\n");
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 419 return -1;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 420 }
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 421
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 422 if (rx_buf && *rx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 423 put_unaligned(__le16_to_cpu(readl(rx_reg)), (*rx_buf)++);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 424
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 425 return 1;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 426 }
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 427
:::::: The code at line 413 was first introduced by commit
:::::: 60cadec9da7b6c91aca51f408c828f7e74a68379 spi: new orion_spi driver
:::::: TO: Shadi Ammouri <shadi@...vell.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (26592 bytes)
Powered by blists - more mailing lists