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

[xen master] xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused



commit 0fc5fa9333b21122c6e77fa42f5683e31c81bbe5
Author:     Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
AuthorDate: Thu Dec 15 16:26:19 2022 -0500
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Tue Dec 20 09:35:06 2022 +0000

    xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused
    
    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@xxxxxxx>
    Reviewed-by: Rahul Singh <rahul.singh@xxxxxxx>
---
 xen/drivers/passthrough/arm/smmu-v3.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c 
b/xen/drivers/passthrough/arm/smmu-v3.c
index 9c9f463009..d58c5cd0bf 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -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)
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.