[linux-next:master 8395/9390] drivers/iommu/amd/pasid.c:172:3: error: call to undeclared function 'mmu_notifier_unregister'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b0a2c79c6f3590b74742cbbc76687014d47972d8
commit: a5a91e54846d35c234939fb9170e035805353049 [8395/9390] iommu/amd: Add SVA domain support
config: x86_64-buildonly-randconfig-006-20240430 (https://download.01.org/0day-ci/archive/20240430/202404300810.iTQNKCkI-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240430/202404300810.iTQNKCkI-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/202404300810.iTQNKCkI-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/iommu/amd/pasid.c:172:3: error: call to undeclared function 'mmu_notifier_unregister'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     172 |                 mmu_notifier_unregister(&sva_pdom->mn, domain->mm);
         |                 ^
   drivers/iommu/amd/pasid.c:172:3: note: did you mean 'mmu_notifier_release'?
   include/linux/mmu_notifier.h:636:20: note: 'mmu_notifier_release' declared here
     636 | static inline void mmu_notifier_release(struct mm_struct *mm)
         |                    ^
>> drivers/iommu/amd/pasid.c:195:8: error: call to undeclared function 'mmu_notifier_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     195 |         ret = mmu_notifier_register(&pdom->mn, mm);
         |               ^
   drivers/iommu/amd/pasid.c:195:8: note: did you mean 'mmu_notifier_release'?
   include/linux/mmu_notifier.h:636:20: note: 'mmu_notifier_release' declared here
     636 | static inline void mmu_notifier_release(struct mm_struct *mm)
         |                    ^
   2 errors generated.


vim +/mmu_notifier_unregister +172 drivers/iommu/amd/pasid.c

   166	
   167	static void iommu_sva_domain_free(struct iommu_domain *domain)
   168	{
   169		struct protection_domain *sva_pdom = to_pdomain(domain);
   170	
   171		if (sva_pdom->mn.ops)
 > 172			mmu_notifier_unregister(&sva_pdom->mn, domain->mm);
   173	
   174		amd_iommu_domain_free(domain);
   175	}
   176	
   177	static const struct iommu_domain_ops amd_sva_domain_ops = {
   178		.set_dev_pasid = iommu_sva_set_dev_pasid,
   179		.free	       = iommu_sva_domain_free
   180	};
   181	
   182	struct iommu_domain *amd_iommu_domain_alloc_sva(struct device *dev,
   183							struct mm_struct *mm)
   184	{
   185		struct protection_domain *pdom;
   186		int ret;
   187	
   188		pdom = protection_domain_alloc(IOMMU_DOMAIN_SVA);
   189		if (!pdom)
   190			return ERR_PTR(-ENOMEM);
   191	
   192		pdom->domain.ops = &amd_sva_domain_ops;
   193		pdom->mn.ops = &sva_mn;
   194	
 > 195		ret = mmu_notifier_register(&pdom->mn, mm);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux