]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused
authorStewart Hildebrand <stewart.hildebrand@amd.com>
Thu, 15 Dec 2022 21:26:19 +0000 (16:26 -0500)
committerJulien Grall <jgrall@amazon.com>
Tue, 20 Dec 2022 09:35:06 +0000 (09:35 +0000)
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) { }
                   ^

arm_smmu_disable_pasid is not currently called from anywhere in Xen, but
it is inside a section of code guarded by CONFIG_PCI_ATS, which may be
helpful in the future if the PASID feature is to be implemented. Add the
attribute __maybe_unused to the function.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
xen/drivers/passthrough/arm/smmu-v3.c

index 9c9f4630090ef5e930a9163a787667f6cbbb73a0..d58c5cd0bf772226904038e5c05d901ba1d5e1f9 100644 (file)
@@ -1376,7 +1376,8 @@ static int arm_smmu_enable_pasid(struct arm_smmu_master *master)
        return 0;
 }
 
-static void arm_smmu_disable_pasid(struct arm_smmu_master *master)
+static void __maybe_unused
+arm_smmu_disable_pasid(struct arm_smmu_master *master)
 {
        struct pci_dev *pdev;
 
@@ -1405,7 +1406,8 @@ 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) { }
+static inline void __maybe_unused
+arm_smmu_disable_pasid(struct arm_smmu_master *master) { }
 #endif /* CONFIG_PCI_ATS */
 
 static void arm_smmu_detach_dev(struct arm_smmu_master *master)