drivers/iommu/amd/iommufd.c:62:27: warning: unused variable 'iommu'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git amd/amd-vi head: 103f4e7c8544961c72dd9f68eed384a2f1194d03 commit: 757d2b1fdf5b7d6eead5963a49b5780617987ab8 [12/15] iommu/amd: Introduce gDomID-to-hDomID Mapping and handle parent domain invalidation config: x86_64-randconfig-161-20260119 (https://download.01.org/0day-ci/archive/20260119/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 smatch version: v0.5.0-8985-g2614ff1a reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260119/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
drivers/iommu/amd/iommufd.c: In function 'amd_iommufd_viommu_destroy':
>> drivers/iommu/amd/iommufd.c:62:27: warning: unused variable 'iommu' [-Wunused-variable]
62 | struct amd_iommu *iommu = container_of(viommu->iommu_dev, struct amd_iommu, iommu);
| ^~~~~New smatch warnings:drivers/iommu/amd/nested.c:161 amd_iommu_alloc_domain_nested() warn: 'gdom_info->hdom_id' unsigned <= 0 drivers/iommu/amd/iommu.c:1558 iommu_flush_pages_v1_hdom_ids() warn: iterator 'i' not incremented
Old smatch warnings:drivers/iommu/amd/iommu.c:1483 domain_flush_complete() warn: iterator 'i' not incremented drivers/iommu/amd/iommu.c:1712 domain_flush_pages_v1() warn: iterator 'i' not incremented drivers/iommu/amd/iommu.c:2247 init_gcr3_table() warn: missing error code? 'ret' drivers/iommu/amd/iommu.c:2503 amd_iommu_probe_device() error: uninitialized symbol 'dev_data'. drivers/iommu/amd/iommu.c:2505 amd_iommu_probe_device() error: uninitialized symbol 'dev_data'.
vim +/iommu +62 drivers/iommu/amd/iommufd.c
58
59 static void amd_iommufd_viommu_destroy(struct iommufd_viommu *viommu)
60 {
61 unsigned long flags;
> 62 struct amd_iommu *iommu = container_of(viommu->iommu_dev, struct amd_iommu, iommu);
63 struct amd_iommu_viommu *aviommu = container_of(viommu, struct amd_iommu_viommu, core);
64 struct protection_domain *pdom = aviommu->parent;
65
66 spin_lock_irqsave(&pdom->lock, flags);
67 list_del(&aviommu->pdom_list);
68 spin_unlock_irqrestore(&pdom->lock, flags);
69 xa_destroy(&aviommu->gdomid_array);
70 }
71 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki