When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the following build error:
drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 'arm_smmu_disable_pasid' [-Werror,-Wunused-function] static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { } ^ Remove the function. Signed-off-by: Stewart Hildebrand <stewart.hildebr...@amd.com> --- There is also a definition of arm_smmu_disable_pasid() just above, guarded by #ifdef CONFIG_PCI_ATS. Should this one be removed too? It might be nice to keep this definition for ease of backporting patches from Linux, but if we ever plan on supporting PCI_ATS in Xen this may need to be re-visited. This is a candidate for backport to 4.17, 4.16, and possibly 4.15, although 4.15 has other issues with clang 12. --- xen/drivers/passthrough/arm/smmu-v3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index 9c9f4630090e..f54d85cb4b70 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1404,8 +1404,6 @@ static inline int arm_smmu_enable_pasid(struct arm_smmu_master *master) { return 0; } - -static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { } #endif /* CONFIG_PCI_ATS */ static void arm_smmu_detach_dev(struct arm_smmu_master *master) -- 2.38.2