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: <202111131619.9wolZnsT-lkp@intel.com>
Date:   Sat, 13 Nov 2021 16:19:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Venkata Lakshmi Narayana Gubba <gubbaven@...eaurora.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Johan Hedberg <johan.hedberg@...el.com>,
        Marcel Holtmann <marcel@...tmann.org>
Subject: drivers/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32
 degrades to integer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 059924fdf6c1c31a7c1aa1915884e23f4313dde2 Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991
date:   11 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-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=059924fdf6c1c31a7c1aa1915884e23f4313dde2
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 059924fdf6c1c31a7c1aa1915884e23f4313dde2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/bluetooth/ drivers/hid/ drivers/hwmon/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/tty/serial/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/

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/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer

vim +493 drivers/bluetooth/btqca.c

   440	
   441	int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
   442			   enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
   443			   const char *firmware_name)
   444	{
   445		struct qca_fw_config config;
   446		int err;
   447		u8 rom_ver = 0;
   448		u32 soc_ver;
   449	
   450		bt_dev_dbg(hdev, "QCA setup on UART");
   451	
   452		soc_ver = get_soc_ver(ver.soc_id, ver.rom_ver);
   453	
   454		bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
   455	
   456		config.user_baud_rate = baudrate;
   457	
   458		/* Download rampatch file */
   459		config.type = TLV_TYPE_PATCH;
   460		if (qca_is_wcn399x(soc_type)) {
   461			/* Firmware files to download are based on ROM version.
   462			 * ROM version is derived from last two bytes of soc_ver.
   463			 */
   464			rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
   465				    (soc_ver & 0x0000000f);
   466			snprintf(config.fwname, sizeof(config.fwname),
   467				 "qca/crbtfw%02x.tlv", rom_ver);
   468		} else if (soc_type == QCA_QCA6390) {
   469			rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
   470				    (soc_ver & 0x0000000f);
   471			snprintf(config.fwname, sizeof(config.fwname),
   472				 "qca/htbtfw%02x.tlv", rom_ver);
   473		} else {
   474			snprintf(config.fwname, sizeof(config.fwname),
   475				 "qca/rampatch_%08x.bin", soc_ver);
   476		}
   477	
   478		err = qca_download_firmware(hdev, &config, soc_type);
   479		if (err < 0) {
   480			bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
   481			return err;
   482		}
   483	
   484		/* Give the controller some time to get ready to receive the NVM */
   485		msleep(10);
   486	
   487		/* Download NVM configuration */
   488		config.type = TLV_TYPE_NVM;
   489		if (firmware_name)
   490			snprintf(config.fwname, sizeof(config.fwname),
   491				 "qca/%s", firmware_name);
   492		else if (qca_is_wcn399x(soc_type)) {
 > 493			if (ver.soc_id == QCA_WCN3991_SOC_ID) {
   494				snprintf(config.fwname, sizeof(config.fwname),
   495					 "qca/crnv%02xu.bin", rom_ver);
   496			} else {
   497				snprintf(config.fwname, sizeof(config.fwname),
   498					 "qca/crnv%02x.bin", rom_ver);
   499			}
   500		}
   501		else if (soc_type == QCA_QCA6390)
   502			snprintf(config.fwname, sizeof(config.fwname),
   503				 "qca/htnv%02x.bin", rom_ver);
   504		else
   505			snprintf(config.fwname, sizeof(config.fwname),
   506				 "qca/nvm_%08x.bin", soc_ver);
   507	
   508		err = qca_download_firmware(hdev, &config, soc_type);
   509		if (err < 0) {
   510			bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
   511			return err;
   512		}
   513	
   514		if (soc_type >= QCA_WCN3991) {
   515			err = qca_disable_soc_logging(hdev);
   516			if (err < 0)
   517				return err;
   518		}
   519	
   520		/* Perform HCI reset */
   521		err = qca_send_reset(hdev);
   522		if (err < 0) {
   523			bt_dev_err(hdev, "QCA Failed to run HCI_RESET (%d)", err);
   524			return err;
   525		}
   526	
   527		bt_dev_info(hdev, "QCA setup on UART is completed");
   528	
   529		return 0;
   530	}
   531	EXPORT_SYMBOL_GPL(qca_uart_setup);
   532	

---
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" (39599 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ