drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1049 iwl_pci_probe() warn: mask and shift to zero
From: Dan Carpenter
Date: Wed Oct 28 2020 - 19:58:07 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ed8780e3f2ecc82645342d070c6b4e530532e680
commit: d6f2134a383168bfb28ac458f7e4311e58482439 iwlwifi: add mac/rf types and 160MHz to the device tables
config: parisc-randconfig-m031-20201028 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
New smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1049 iwl_pci_probe() warn: mask and shift to zero
vim +1049 drivers/net/wireless/intel/iwlwifi/pcie/drv.c
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1034
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1035 for (i = 0; i < ARRAY_SIZE(iwl_dev_info_table); i++) {
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1036 const struct iwl_dev_info *dev_info = &iwl_dev_info_table[i];
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1037 if ((dev_info->device == (u16)IWL_CFG_ANY ||
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1038 dev_info->device == pdev->device) &&
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1039 (dev_info->subdevice == (u16)IWL_CFG_ANY ||
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1040 dev_info->subdevice == pdev->subsystem_device) &&
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1041 (dev_info->mac_type == (u16)IWL_CFG_ANY ||
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1042 dev_info->mac_type ==
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1043 CSR_HW_REV_TYPE(iwl_trans->hw_rev)) &&
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1044 (dev_info->rf_type == (u16)IWL_CFG_ANY ||
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1045 dev_info->rf_type ==
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1046 CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id)) &&
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1047 (dev_info->no_160 == (u8)IWL_CFG_ANY ||
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 1048 dev_info->no_160 ==
d6f2134a383168b drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2020-03-09 @1049 IWL_SUBDEVICE_NO_160(pdev->subsystem_device))) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The IWL_SUBDEVICE_NO_160() is:
#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0100) >> 9
And 0x100 >> 9 is zero. Probably either the mask or the shift is has a
typo.
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1050 iwl_trans->cfg = dev_info->cfg;
0b295a1eb81f37d drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1051 iwl_trans->name = dev_info->name;
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1052 goto found;
2a612a60ab440e6 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-10-10 1053 }
7d34a7d7da97bc8 drivers/net/wireless/intel/iwlwifi/pcie/drv.c Luca Coelho 2019-07-12 1054 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip