Skip to contentSkip to conversation

iommu/amd: Fix compilation error

PATCH Applied Andy Shevchenko 3 participants 3 messages Apr 29, 2024 – May 3, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/amd: Fix compilation error

With WERROR=y, which is default, clang is not happy:

.../amd/pasid.c:168:3: error: call to undeclared function 'mmu_notifier_unregister'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] .../amd/pasid.c:191:8: error: call to undeclared function 'mmu_notifier_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2 errors generated.

Select missed dependency.

Fixes a5a91e54846d ("iommu/amd: Add SVA domain support")
---
 drivers/iommu/amd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/amd/Kconfig +1 -0
index 68d8fc107cb9..994063e5586f 100644
@@ -7,6 +7,7 @@ config AMD_IOMMU
 	select PCI_ATS
 	select PCI_PRI
 	select PCI_PASID
+	select MMU_NOTIFIER
 	select IOMMU_API
 	select IOMMU_IOVA
 	select IOMMU_IO_PGTABLE
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andy Shevchenko

With WERROR=y, which is default, clang is not happy:

.../amd/pasid.c:168:3: error: call to undeclared function 'mmu_notifier_unregister'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] .../amd/pasid.c:191:8: error: call to undeclared function 'mmu_notifier_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2 errors generated.

Quoted 7 lines

Select missed dependency.

Fixes a5a91e54846d ("iommu/amd: Add SVA domain support")
---
 drivers/iommu/amd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Jason