On 23/10/2023 14:53, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: e8361b005d7c92997d12f2b85a9e4a525738bd9d > commit: 14207f68dddf152fd0b2916451a1f4702de886e4 [11303/14422] iommu: Add iommu_domain ops for dirty tracking > config: sparc64-randconfig-r002-20220915 (https://download.01.org/0day-ci/archive/20231023/202310232131.TOhkKzZa-lkp@xxxxxxxxx/config) > compiler: sparc64-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231023/202310232131.TOhkKzZa-lkp@xxxxxxxxx/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@xxxxxxxxx> > | Closes: https://lore.kernel.org/oe-kbuild-all/202310232131.TOhkKzZa-lkp@xxxxxxxxx/ > > All warnings (new ones prefixed by >>): > > In file included from drivers/iommu/io-pgtable.c:11: >>> include/linux/io-pgtable.h:172:44: warning: 'struct iommu_dirty_bitmap' declared inside parameter list will not be visible outside of this definition or declaration > 172 | struct iommu_dirty_bitmap *dirty); > | ^~~~~~~~~~~~~~~~~~ > > > vim +172 include/linux/io-pgtable.h 'Interesting' randconfig where we build sparc64 with ARM io-pgtable code (also with IOMMU_API not set but with IOMMU_SUPPORT=y). I have fixed the warning as below in the ifdef clause for !IOMMU_API following the rest of the style of the header: diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 9379ceefa5da..291b663c6c05 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -802,6 +802,8 @@ struct iommu_fwspec {}; struct iommu_device {}; struct iommu_fault_param {}; struct iommu_iotlb_gather {}; +struct iommu_dirty_bitmap {}; +struct iommu_dirty_ops {}; static inline bool iommu_present(const struct bus_type *bus) { @@ -1034,6 +1036,18 @@ static inline bool iommu_iotlb_gather_queued(struct iommu_iotlb_gather *gather) return false; } +static inline void iommu_dirty_bitmap_init(struct iommu_dirty_bitmap *dirty, + struct iova_bitmap *bitmap, + struct iommu_iotlb_gather *gather) +{ +} + +static inline void iommu_dirty_bitmap_record(struct iommu_dirty_bitmap *dirty, + unsigned long iova, + unsigned long length) +{ +} + static inline void iommu_device_unregister(struct iommu_device *iommu) { }