iommu: omap: mark pm functions __maybe_unused
PATCH 1/1 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.
--- drivers/iommu/omap-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/omap-iommu.c +2 -2
@@ -1019,7 +1019,7 @@ EXPORT_SYMBOL_GPL(omap_iommu_domain_activate);* reset line. This function also saves the context of any * locked TLBs if suspending. **/ -static int omap_iommu_runtime_suspend (struct device *dev) +static __maybe_unused int omap_iommu_runtime_suspend (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);struct iommu_platform_data *pdata =dev_get_platdata (dev);
@@ -1061,7 +1061,7 @@ static int omap_iommu_runtime_suspend(struct device *dev)* reset line. The function also restores any locked TLBs if * resuming after a suspend. **/ -static int omap_iommu_runtime_resume (struct device *dev) +static __maybe_unused int omap_iommu_runtime_resume (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);struct iommu_platform_data *pdata =dev_get_platdata (dev);
Signature · 1 line
2.20.0
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
The
runtime_pmfunctions are unused whenCONFIG_PMis disabled:
drivers/iommu/omap-iommu.c:1022:12: error: unused function 'omap_iommu_runtime_suspend' [-Werror,-Wunused-function] static intomap_iommu_runtime_suspend(struct device *dev)drivers/iommu/omap-iommu.c:1064:12: error: unused function 'omap_iommu_runtime_resume' [-Werror,-Wunused-function] static intomap_iommu_runtime_resume(struct device *dev)Mark them as
__maybe_unusedto let gcc silently drop them instead of warning.
Curious, what defconfig is this? OMAP drivers won't be functional in general without pm_runtime, so CONFIG_PM is mandatory. But from just a CONFIG_PM option point of view, agree with the patch.
Quoted 3 lines
Fixes db8918f61d51 ("iommu/omap: streamline enable/disable through runtime pm callbacks")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 19 lines
--- drivers/iommu/omap-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iommu/omap-iommu.c +1
-1@@ -1019,7 +1019,7 @@ EXPORT_SYMBOL_GPL(omap_iommu_domain_activate);* reset line. This function also saves the context of any * locked TLBs if suspending. **/ -static int omap_iommu_runtime_suspend (struct device *dev) +static __maybe_unused int omap_iommu_runtime_suspend (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);struct iommu_platform_data *pdata =dev_get_platdata (dev);
drivers/iommu/omap-iommu.c static int omap_iommu_runtime_suspend(struct device *dev) · line 1067
Quoted 8 lines
drivers/iommu/omap-iommu.c +1
-1@@ -1061,7 +1061,7 @@ static int omap_iommu_runtime_suspend(struct device *dev)* reset line. The function also restores any locked TLBs if * resuming after a suspend. **/ -static int omap_iommu_runtime_resume (struct device *dev) +static __maybe_unused int omap_iommu_runtime_resume (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);struct iommu_platform_data *pdata =dev_get_platdata (dev);
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 11 lines · Suman Anna
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
The
runtime_pmfunctions are unused whenCONFIG_PMis disabled:
drivers/iommu/omap-iommu.c:1022:12: error: unused function 'omap_iommu_runtime_suspend' [-Werror,-Wunused-function] static intomap_iommu_runtime_suspend(struct device *dev)drivers/iommu/omap-iommu.c:1064:12: error: unused function 'omap_iommu_runtime_resume' [-Werror,-Wunused-function] static intomap_iommu_runtime_resume(struct device *dev)
Quoted 6 lines
Quoted 2 lines
Mark them as
__maybe_unusedto let gcc silently drop them instead of warning.Curious, what defconfig is this? OMAP drivers won't be functional in general without
pm_runtime, soCONFIG_PMis mandatory. But from just aCONFIG_PMoption point of view, agree with the patch.
I did some randconfig builds for testing the stuff I merged for 5.4. I don't think there are any defconfigs without CONFIG_PM.
Arnd
Quoted 2 lines · Arnd Bergmann
drivers/iommu/omap-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks Arnd.