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]
Date:   Fri, 9 Dec 2022 23:59:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Stafford Horne <shorne@...il.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to
 restricted __le64

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0d1409e4ff08aa4a9a254d3f723410db32aa7552
commit: ded2ee36313c941f1a12b6f85cde295b575264ae openrisc: Add pci bus support
date:   4 months ago
config: openrisc-randconfig-s053-20221209
compiler: or1k-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=ded2ee36313c941f1a12b6f85cde295b575264ae
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ded2ee36313c941f1a12b6f85cde295b575264ae
        # 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=openrisc SHELL=/bin/bash drivers/staging/vt6655/

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

sparse warnings: (new ones prefixed by >>)
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64
>> drivers/staging/vt6655/card.c:758:16: sparse: sparse: cast to restricted __le64

vim +758 drivers/staging/vt6655/card.c

5449c685a4b395 Forest Bond       2009-04-25  728  
5449c685a4b395 Forest Bond       2009-04-25  729  /*
5449c685a4b395 Forest Bond       2009-04-25  730   * Description: Read NIC TSF counter
5449c685a4b395 Forest Bond       2009-04-25  731   *              Get local TSF counter
5449c685a4b395 Forest Bond       2009-04-25  732   *
5449c685a4b395 Forest Bond       2009-04-25  733   * Parameters:
5449c685a4b395 Forest Bond       2009-04-25  734   *  In:
919612444272c0 Malcolm Priestley 2015-10-17  735   *      priv         - The adapter to be read
5449c685a4b395 Forest Bond       2009-04-25  736   *  Out:
5449c685a4b395 Forest Bond       2009-04-25  737   *      qwCurrTSF       - Current TSF counter
5449c685a4b395 Forest Bond       2009-04-25  738   *
5a5a2a6ad4aa24 Charles Clément   2010-08-01  739   * Return Value: true if success; otherwise false
5449c685a4b395 Forest Bond       2009-04-25  740   */
60a16985171c4e Philipp Hortmann  2022-05-01  741  u64 vt6655_get_current_tsf(struct vnt_private *priv)
5449c685a4b395 Forest Bond       2009-04-25  742  {
1977dcf07bddf7 Tommaso Merciai   2021-10-05  743  	void __iomem *iobase = priv->port_offset;
2986db5fd31e31 Charles Clément   2010-06-24  744  	unsigned short ww;
eb3bdf59803905 Tommaso Merciai   2021-11-06  745  	unsigned char data;
79ffde57deb8e3 Philipp Hortmann  2022-05-01  746  	u32 low, high;
5449c685a4b395 Forest Bond       2009-04-25  747  
26f64a6ba14994 Varsha Rao        2016-10-15  748  	MACvRegBitsOn(iobase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD);
5449c685a4b395 Forest Bond       2009-04-25  749  	for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
08bea7da71b34c Philipp Hortmann  2022-04-16  750  		data = ioread8(iobase + MAC_REG_TFTCTL);
eb3bdf59803905 Tommaso Merciai   2021-11-06  751  		if (!(data & TFTCTL_TSFCNTRRD))
5449c685a4b395 Forest Bond       2009-04-25  752  			break;
5449c685a4b395 Forest Bond       2009-04-25  753  	}
5449c685a4b395 Forest Bond       2009-04-25  754  	if (ww == W_MAX_TIMEOUT)
60a16985171c4e Philipp Hortmann  2022-05-01  755  		return 0;
79ffde57deb8e3 Philipp Hortmann  2022-05-01  756  	low = ioread32(iobase + MAC_REG_TSFCNTR);
79ffde57deb8e3 Philipp Hortmann  2022-05-01  757  	high = ioread32(iobase + MAC_REG_TSFCNTR + 4);
60a16985171c4e Philipp Hortmann  2022-05-01 @758  	return le64_to_cpu(low + ((u64)high << 32));
5449c685a4b395 Forest Bond       2009-04-25  759  }
5449c685a4b395 Forest Bond       2009-04-25  760  

:::::: The code at line 758 was first introduced by commit
:::::: 60a16985171c4e53e98facf40dfe035f7e34fc83 staging: vt6655: Replace unused return value of vt6655_get_current_tsf

:::::: TO: Philipp Hortmann <philipp.g.hortmann@...il.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

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

View attachment "config" of type "text/plain" (152425 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ