[bluetooth-next:master 27/32] drivers/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head:   a88ef85069487a3616ef49e2b5a276eeb1100000
commit: 73f209c5bedb0b1d408e8b9de60cc0f27cc19b37 [27/32] Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991
config: m68k-randconfig-s032-20201123 (attached as .config)
compiler: m68k-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/bluetooth/bluetooth-next.git/commit/?id=73f209c5bedb0b1d408e8b9de60cc0f27cc19b37
        git remote add bluetooth-next https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
        git fetch --no-tags bluetooth-next master
        git checkout 73f209c5bedb0b1d408e8b9de60cc0f27cc19b37
        # 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=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


"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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux