From: kernel test robot <lkp@intel.com>
To: Jacob Pan <jacob.pan@linux.microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev, Jason Gunthorpe <jgg@ziepe.ca>
Subject: [jgunthorpe:iommufd_noiommu 5/6] drivers/iommu/iommufd/io_pagetable.c:855:23: warning: variable 'area_iova' set but not used
Date: Tue, 03 Feb 2026 07:45:09 +0800 [thread overview]
Message-ID: <202602030758.hZavVdX9-lkp@intel.com> (raw)
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
next reply other threads:[~2026-02-02 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 23:45 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202602030758.hZavVdX9-lkp@intel.com \
--to=lkp@intel.com \
--cc=jacob.pan@linux.microsoft.com \
--cc=jgg@ziepe.ca \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.