Re: [PATCH] iommu: omap: mark pm functions __maybe_unused
From: Arnd Bergmann
Date: Fri Sep 06 2019 - 11:58:57 EST
On Fri, Sep 6, 2019 at 5:24 PM Suman Anna <s-anna@xxxxxx> wrote:
>
> Hi Arnd,
>
> On 9/6/19 10:15 AM, Arnd Bergmann wrote:
> > 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.
>
> 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.
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