Skip to content

Commit 96088a2

Browse files
arndbjoergroedel
authored andcommitted
iommu/omap: Mark pm functions __maybe_unused
The runtime_pm functions are unused when CONFIG_PM is disabled: drivers/iommu/omap-iommu.c:1022:12: error: unused function 'omap_iommu_runtime_suspend' [-Werror,-Wunused-function] static int omap_iommu_runtime_suspend(struct device *dev) drivers/iommu/omap-iommu.c:1064:12: error: unused function 'omap_iommu_runtime_resume' [-Werror,-Wunused-function] static int omap_iommu_runtime_resume(struct device *dev) Mark them as __maybe_unused to let gcc silently drop them instead of warning. Fixes: db8918f ("iommu/omap: streamline enable/disable through runtime pm callbacks") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Suman Anna <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 24ce0ba commit 96088a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/omap-iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ EXPORT_SYMBOL_GPL(omap_iommu_domain_activate);
10191019
* reset line. This function also saves the context of any
10201020
* locked TLBs if suspending.
10211021
**/
1022-
static int omap_iommu_runtime_suspend(struct device *dev)
1022+
static __maybe_unused int omap_iommu_runtime_suspend(struct device *dev)
10231023
{
10241024
struct platform_device *pdev = to_platform_device(dev);
10251025
struct iommu_platform_data *pdata = dev_get_platdata(dev);
@@ -1061,7 +1061,7 @@ static int omap_iommu_runtime_suspend(struct device *dev)
10611061
* reset line. The function also restores any locked TLBs if
10621062
* resuming after a suspend.
10631063
**/
1064-
static int omap_iommu_runtime_resume(struct device *dev)
1064+
static __maybe_unused int omap_iommu_runtime_resume(struct device *dev)
10651065
{
10661066
struct platform_device *pdev = to_platform_device(dev);
10671067
struct iommu_platform_data *pdata = dev_get_platdata(dev);

0 commit comments

Comments
 (0)