Skip to content
  • Arnd Bergmann's avatar
    iommu: qcom: annotate PM functions as __maybe_unused · 6ce5b0f2
    Arnd Bergmann authored
    The qcom_iommu_disable_clocks() function is only called from PM
    code that is hidden in an #ifdef, causing a harmless warning without
    CONFIG_PM:
    
    drivers/iommu/qcom_iommu.c:601:13: error: 'qcom_iommu_disable_clocks' defined but not used [-Werror=unused-function]
     static void qcom_iommu_disable_clocks(struct qcom_iommu_dev *qcom_iommu)
    drivers/iommu/qcom_iommu.c:581:12: error: 'qcom_iommu_enable_clocks' defined but not used [-Werror=unused-function]
     static int qcom_iommu_enable_clocks(struct qcom_iommu_dev *qcom_iommu)
    
    Replacing that #ifdef with __maybe_unused annotations lets the compiler
    drop the functions silently instead.
    
    Fixes: 0ae349a0
    
     ("iommu/qcom: Add qcom_iommu")
    Acked-by: default avatarRob Clark <robdclark@gmail.com>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    6ce5b0f2