lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202010041331.LjXMlEco-lkp@intel.com>
Date:   Sun, 4 Oct 2020 13:04:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: drivers/spi/spi-orion.c:409:24: sparse: sparse: incorrect type in
 argument 1 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   22fbc037cd32e4e6771d2271b565806cfb8c134c
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date:   11 months ago
config: alpha-randconfig-s032-20201004 (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.2-201-g24bdaac6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80591e61a0f7e88deaada69844e4a31280c4a38f
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
        # 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@...el.com>

	echo
	echo "sparse warnings: (new ones prefixed by >>)"
	echo
>> drivers/spi/spi-orion.c:409:24: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le16 [usertype] @@
>> drivers/spi/spi-orion.c:409:24: sparse:     expected unsigned int [usertype] b
   drivers/spi/spi-orion.c:409:24: sparse:     got restricted __le16 [usertype]
   drivers/spi/spi-orion.c:419:17: sparse: sparse: cast to restricted __le16
   drivers/spi/spi-orion.c:419:17: sparse: sparse: cast to restricted __le16
   drivers/spi/spi-orion.c:419:17: sparse: sparse: cast to restricted __le16
   drivers/spi/spi-orion.c:419:17: sparse: sparse: cast to restricted __le16

vim +409 drivers/spi/spi-orion.c

60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  392  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  393  static inline int
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  394  orion_spi_write_read_16bit(struct spi_device *spi,
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  395  			   const u16 **tx_buf, u16 **rx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  396  {
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  397  	void __iomem *tx_reg, *rx_reg, *int_reg;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  398  	struct orion_spi *orion_spi;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  399  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  400  	orion_spi = spi_master_get_devdata(spi->master);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  401  	tx_reg = spi_reg(orion_spi, ORION_SPI_DATA_OUT_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  402  	rx_reg = spi_reg(orion_spi, ORION_SPI_DATA_IN_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  403  	int_reg = spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  404  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  405  	/* clear the interrupt cause register */
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  406  	writel(0x0, int_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  407  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  408  	if (tx_buf && *tx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05 @409  		writel(__cpu_to_le16(get_unaligned((*tx_buf)++)), tx_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  410  	else
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  411  		writel(0, tx_reg);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  412  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  413  	if (orion_spi_wait_till_ready(orion_spi) < 0) {
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  414  		dev_err(&spi->dev, "TXS timed out\n");
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  415  		return -1;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  416  	}
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  417  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  418  	if (rx_buf && *rx_buf)
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  419  		put_unaligned(__le16_to_cpu(readl(rx_reg)), (*rx_buf)++);
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  420  
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  421  	return 1;
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  422  }
60cadec9da7b6c drivers/spi/orion_spi.c Shadi Ammouri 2008-08-05  423  

:::::: The code at line 409 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" (42402 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ