Messages in this thread | | | Date | Wed, 12 Aug 2020 01:57:56 +0800 | From | kernel test robot <> | Subject | drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1032 iwl_pci_probe() warn: we never enter this loop |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 00e4db51259a5f936fec1424b884f029479d3981 commit: 2a612a60ab440e6480c77b73403dfee061f74e4b iwlwifi: implement a new device configuration table date: 7 months ago config: parisc-randconfig-m031-20200811 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings: drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1032 iwl_pci_probe() warn: we never enter this loop
Old smatch warnings: drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1035 iwl_pci_probe() warn: impossible condition '(dev_info->device == (~0)) => (0-u16max == (-1))' drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1037 iwl_pci_probe() warn: impossible condition '(dev_info->subdevice == (~0)) => (0-u16max == (-1))'
vim +1032 drivers/net/wireless/intel/iwlwifi/pcie/drv.c
1002 1003 static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1004 { 1005 const struct iwl_cfg_trans_params *trans = 1006 (struct iwl_cfg_trans_params *)(ent->driver_data); 1007 const struct iwl_cfg *cfg_7265d __maybe_unused = NULL; 1008 struct iwl_trans *iwl_trans; 1009 struct iwl_trans_pcie *trans_pcie; 1010 unsigned long flags; 1011 int i, ret; 1012 /* 1013 * This is needed for backwards compatibility with the old 1014 * tables, so we don't need to change all the config structs 1015 * at the same time. The cfg is used to compare with the old 1016 * full cfg structs. 1017 */ 1018 const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); 1019 1020 /* make sure trans is the first element in iwl_cfg */ 1021 BUILD_BUG_ON(offsetof(struct iwl_cfg, trans)); 1022 1023 iwl_trans = iwl_trans_pcie_alloc(pdev, ent, trans); 1024 if (IS_ERR(iwl_trans)) 1025 return PTR_ERR(iwl_trans); 1026 1027 trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); 1028 1029 /* the trans_cfg should never change, so set it now */ 1030 iwl_trans->trans_cfg = trans; 1031 > 1032 for (i = 0; i < ARRAY_SIZE(iwl_dev_info_table); i++) { 1033 const struct iwl_dev_info *dev_info = &iwl_dev_info_table[i]; 1034 1035 if ((dev_info->device == IWL_CFG_ANY || 1036 dev_info->device == pdev->device) && 1037 (dev_info->subdevice == IWL_CFG_ANY || 1038 dev_info->subdevice == pdev->subsystem_device)) { 1039 iwl_trans->cfg = dev_info->cfg; 1040 goto found; 1041 } 1042 } 1043
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |