Hi Liu, url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/iommu-vt-d-Misc-fixes-on-scalable-mode/20201229-113203 base: 5c8fe583cce542aa0b84adc939ce85293de36e5e config: i386-randconfig-m021-20201229 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/iommu/intel/iommu.c:1471 domain_update_iotlb() error: we previously assumed 'info' could be null (see line 1472) Old smatch warnings: drivers/iommu/intel/iommu.c:920 device_to_iommu() error: we previously assumed 'pdev' could be null (see line 893) drivers/iommu/intel/iommu.c:3764 intel_iommu_add() warn: should '(1 << sp)' be a 64 bit type? vim +/info +1471 drivers/iommu/intel/iommu.c 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1464 static void domain_update_iotlb(struct dmar_domain *domain) 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1465 { 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1466 struct device_domain_info *info; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1467 bool has_iotlb_device = false; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1468 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1469 assert_spin_locked(&device_domain_lock); 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1470 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 @1471 list_for_each_entry(info, &domain->devices, link) 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 @1472 if (info && info->ats_enabled) { ^^^^ "info" is the list iterator so it can't ever be NULL. Just delete the NULL check. 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1473 has_iotlb_device = true; 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1474 break; 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1475 } 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1476 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1477 if (!has_iotlb_device) { 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1478 struct subdev_domain_info *sinfo; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1479 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1480 list_for_each_entry(sinfo, &domain->subdevices, link_domain) { 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1481 info = get_domain_info(sinfo->pdev); 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1482 if (info && info->ats_enabled) { 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1483 has_iotlb_device = true; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1484 break; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1485 } 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1486 } 1aaf68f8927fb5c drivers/iommu/intel/iommu.c Liu Yi L 2020-12-29 1487 } 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1488 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1489 domain->has_iotlb_device = has_iotlb_device; 0824c5920b16fe1 drivers/iommu/intel-iommu.c Omer Peleg 2016-04-20 1490 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org