* [jgunthorpe:iommufd_noiommu 5/6] drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used
@ 2026-02-02 23:45 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-02-02 23:45 UTC (permalink / raw)
To: Jacob Pan; +Cc: oe-kbuild-all, Jason Gunthorpe
tree: https://github.com/jgunthorpe/linux iommufd_noiommu
head: 5259d5e34eb7da1c96802e79113ccca538730d5e
commit: ca213f193f2c2aa9b43a653bc6466e1216f6e767 [5/6] iommufd: Add an ioctl IOMMU_IOAS_GET_PA to query PA from IOVA
config: parisc-randconfig-001-20260203 (https://download.01.org/0day-ci/archive/20260203/202602030758.hZavVdX9-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260203/202602030758.hZavVdX9-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602030758.hZavVdX9-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/iommu/iommufd/io_pagetable.c: In function 'iopt_get_phys':
>> drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used [-Wunused-but-set-variable]
855 | unsigned long area_iova;
| ^~~~~~~~~
vim +/area_iova +855 drivers/iommu/iommufd/io_pagetable.c
851
852 int iopt_get_phys(struct io_pagetable *iopt, unsigned long iova, u64 *paddr,
853 u64 *length)
854 {
> 855 unsigned long area_iova;
856 struct iopt_area *area;
857 int rc = 0;
858
859 if (!IS_ENABLED(CONFIG_VFIO_NOIOMMU))
860 return -EOPNOTSUPP;
861
862 down_read(&iopt->iova_rwsem);
863 area = iopt_area_iter_first(iopt, iova, iova);
864 if (!area || !area->pages) {
865 rc = -ENOENT;
866 goto unlock_exit;
867 }
868
869 if (!area->storage_domain ||
870 area->storage_domain->owner != &iommufd_noiommu_ops) {
871 rc = -EOPNOTSUPP;
872 goto unlock_exit;
873 }
874
875 area_iova = iopt_area_iova(area);
876 *paddr = iommu_iova_to_phys(area->storage_domain, iova);
877 if (!*paddr) {
878 rc = -EINVAL;
879 goto unlock_exit;
880 }
881 /*
882 * TBD: we can return contiguous IOVA length so that userspace can
883 * keep searching for next physical address.
884 */
885 *length = PAGE_SIZE;
886
887 unlock_exit:
888 up_read(&iopt->iova_rwsem);
889
890 return rc;
891 }
892
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [jgunthorpe:iommufd_noiommu 5/6] drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used
@ 2026-02-03 1:19 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-02-03 1:19 UTC (permalink / raw)
To: Jacob Pan; +Cc: oe-kbuild-all, Jason Gunthorpe
tree: https://github.com/jgunthorpe/linux iommufd_noiommu
head: 5259d5e34eb7da1c96802e79113ccca538730d5e
commit: ca213f193f2c2aa9b43a653bc6466e1216f6e767 [5/6] iommufd: Add an ioctl IOMMU_IOAS_GET_PA to query PA from IOVA
config: x86_64-rhel-9.4-kunit (https://download.01.org/0day-ci/archive/20260203/202602030211.fCQFe9Ar-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260203/202602030211.fCQFe9Ar-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602030211.fCQFe9Ar-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/iommu/iommufd/io_pagetable.c: In function 'iopt_get_phys':
>> drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used [-Wunused-but-set-variable]
855 | unsigned long area_iova;
| ^~~~~~~~~
vim +/area_iova +855 drivers/iommu/iommufd/io_pagetable.c
851
852 int iopt_get_phys(struct io_pagetable *iopt, unsigned long iova, u64 *paddr,
853 u64 *length)
854 {
> 855 unsigned long area_iova;
856 struct iopt_area *area;
857 int rc = 0;
858
859 if (!IS_ENABLED(CONFIG_VFIO_NOIOMMU))
860 return -EOPNOTSUPP;
861
862 down_read(&iopt->iova_rwsem);
863 area = iopt_area_iter_first(iopt, iova, iova);
864 if (!area || !area->pages) {
865 rc = -ENOENT;
866 goto unlock_exit;
867 }
868
869 if (!area->storage_domain ||
870 area->storage_domain->owner != &iommufd_noiommu_ops) {
871 rc = -EOPNOTSUPP;
872 goto unlock_exit;
873 }
874
875 area_iova = iopt_area_iova(area);
876 *paddr = iommu_iova_to_phys(area->storage_domain, iova);
877 if (!*paddr) {
878 rc = -EINVAL;
879 goto unlock_exit;
880 }
881 /*
882 * TBD: we can return contiguous IOVA length so that userspace can
883 * keep searching for next physical address.
884 */
885 *length = PAGE_SIZE;
886
887 unlock_exit:
888 up_read(&iopt->iova_rwsem);
889
890 return rc;
891 }
892
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-03 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 1:19 [jgunthorpe:iommufd_noiommu 5/6] drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-02-02 23:45 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.