From: Suman Anna via iommu <iommu@lists.linux-foundation.org>
To: Arnd Bergmann <arnd@arndb.de>, Joerg Roedel <joro@8bytes.org>
Cc: Tero Kristo <t-kristo@ti.com>,
iommu@lists.linux-foundation.org, Joerg Roedel <jroedel@suse.de>,
Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: omap: mark pm functions __maybe_unused
Date: Fri, 6 Sep 2019 10:24:19 -0500 [thread overview]
Message-ID: <20150686-f14c-389b-7345-699cee191116@ti.com> (raw)
In-Reply-To: <20190906151551.1192788-1-arnd@arndb.de>
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.
>
> Fixes: db8918f61d51 ("iommu/omap: streamline enable/disable through runtime pm callbacks")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Suman Anna <s-anna@ti.com>
> ---
> drivers/iommu/omap-iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 451e3c98ab2d..09c6e1c680db 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -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);
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-09-06 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 15:15 [PATCH] iommu: omap: mark pm functions __maybe_unused Arnd Bergmann
2019-09-06 15:24 ` Suman Anna via iommu [this message]
2019-09-06 15:58 ` Arnd Bergmann
2019-09-06 15:55 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150686-f14c-389b-7345-699cee191116@ti.com \
--to=iommu@lists.linux-foundation.org \
--cc=arnd@arndb.de \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=s-anna@ti.com \
--cc=t-kristo@ti.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).