IOMMU Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] iommu: omap: mark pm functions __maybe_unused
@ 2019-09-06 15:15 Arnd Bergmann
  2019-09-06 15:24 ` Suman Anna via iommu
  2019-09-06 15:55 ` Joerg Roedel
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-09-06 15:15 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Joerg Roedel, Arnd Bergmann, linux-kernel, Tero Kristo, iommu,
	Will Deacon

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: db8918f61d51 ("iommu/omap: streamline enable/disable through runtime pm callbacks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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);
-- 
2.20.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu: omap: mark pm functions __maybe_unused
  2019-09-06 15:15 [PATCH] iommu: omap: mark pm functions __maybe_unused Arnd Bergmann
@ 2019-09-06 15:24 ` Suman Anna via iommu
  2019-09-06 15:58   ` Arnd Bergmann
  2019-09-06 15:55 ` Joerg Roedel
  1 sibling, 1 reply; 4+ messages in thread
From: Suman Anna via iommu @ 2019-09-06 15:24 UTC (permalink / raw)
  To: Arnd Bergmann, Joerg Roedel
  Cc: Tero Kristo, iommu, Joerg Roedel, Will Deacon, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu: omap: mark pm functions __maybe_unused
  2019-09-06 15:15 [PATCH] iommu: omap: mark pm functions __maybe_unused Arnd Bergmann
  2019-09-06 15:24 ` Suman Anna via iommu
@ 2019-09-06 15:55 ` Joerg Roedel
  1 sibling, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2019-09-06 15:55 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Joerg Roedel, linux-kernel, Tero Kristo, iommu, Will Deacon

On Fri, Sep 06, 2019 at 05:15:38PM +0200, Arnd Bergmann wrote:
>  drivers/iommu/omap-iommu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks Arnd.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu: omap: mark pm functions __maybe_unused
  2019-09-06 15:24 ` Suman Anna via iommu
@ 2019-09-06 15:58   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-09-06 15:58 UTC (permalink / raw)
  To: Suman Anna
  Cc: Joerg Roedel, linux-kernel, Tero Kristo, open list:IOMMU DRIVERS,
	Will Deacon

On Fri, Sep 6, 2019 at 5:24 PM Suman Anna <s-anna@ti.com> 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
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 15:15 [PATCH] iommu: omap: mark pm functions __maybe_unused Arnd Bergmann
2019-09-06 15:24 ` Suman Anna via iommu
2019-09-06 15:58   ` Arnd Bergmann
2019-09-06 15:55 ` Joerg Roedel

IOMMU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \
		iommu@lists.linux-foundation.org iommu@archiver.kernel.org
	public-inbox-index linux-iommu


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu


AGPL code for this site: git clone https://public-inbox.org/ public-inbox