iommu: qcom: annotate PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Wed, 23 Aug 2017 13:42:45 +0000 (15:42 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 28 Aug 2017 09:24:52 +0000 (11:24 +0200)
commit6ce5b0f22d6061b33aaf302f73302f402fea0c17
treef7bd0e73a686198b90ac8680e3adaffe254d82c7
parentd43ecff3efbe0dcff4c239a65b17e68134388ed6
iommu: qcom: annotate PM functions as __maybe_unused

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: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu")
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/qcom_iommu.c