linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: tegra210-adma: Fix unused function warnings
@ 2019-07-09  8:32 YueHaibing
  2019-07-10  8:38 ` Jon Hunter
  2019-07-25 13:02 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-07-09  8:32 UTC (permalink / raw)
  To: ldewangan, jonathanh, vkoul, dan.j.williams, thierry.reding
  Cc: linux-kernel, dmaengine, linux-tegra, YueHaibing

If CONFIG_PM is not set, build warnings:

drivers/dma/tegra210-adma.c:747:12: warning: tegra_adma_runtime_resume defined but not used [-Wunused-function]
 static int tegra_adma_runtime_resume(struct device *dev)
drivers/dma/tegra210-adma.c:715:12: warning: tegra_adma_runtime_suspend defined but not used [-Wunused-function]
 static int tegra_adma_runtime_suspend(struct device *dev)

Mark the two function as __maybe_unused.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/dma/tegra210-adma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index 2805853..b33cf6e 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -712,7 +712,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
 	return chan;
 }
 
-static int tegra_adma_runtime_suspend(struct device *dev)
+static int __maybe_unused tegra_adma_runtime_suspend(struct device *dev)
 {
 	struct tegra_adma *tdma = dev_get_drvdata(dev);
 	struct tegra_adma_chan_regs *ch_reg;
@@ -744,7 +744,7 @@ static int tegra_adma_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int tegra_adma_runtime_resume(struct device *dev)
+static int __maybe_unused tegra_adma_runtime_resume(struct device *dev)
 {
 	struct tegra_adma *tdma = dev_get_drvdata(dev);
 	struct tegra_adma_chan_regs *ch_reg;
-- 
2.7.4



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

* Re: [PATCH] dmaengine: tegra210-adma: Fix unused function warnings
  2019-07-09  8:32 [PATCH] dmaengine: tegra210-adma: Fix unused function warnings YueHaibing
@ 2019-07-10  8:38 ` Jon Hunter
  2019-07-25 13:02 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Jon Hunter @ 2019-07-10  8:38 UTC (permalink / raw)
  To: YueHaibing, ldewangan, vkoul, dan.j.williams, thierry.reding
  Cc: linux-kernel, dmaengine, linux-tegra


On 09/07/2019 09:32, YueHaibing wrote:
> If CONFIG_PM is not set, build warnings:
> 
> drivers/dma/tegra210-adma.c:747:12: warning: tegra_adma_runtime_resume defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_resume(struct device *dev)
> drivers/dma/tegra210-adma.c:715:12: warning: tegra_adma_runtime_suspend defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_suspend(struct device *dev)
> 
> Mark the two function as __maybe_unused.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/dma/tegra210-adma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
> index 2805853..b33cf6e 100644
> --- a/drivers/dma/tegra210-adma.c
> +++ b/drivers/dma/tegra210-adma.c
> @@ -712,7 +712,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
>  	return chan;
>  }
>  
> -static int tegra_adma_runtime_suspend(struct device *dev)
> +static int __maybe_unused tegra_adma_runtime_suspend(struct device *dev)
>  {
>  	struct tegra_adma *tdma = dev_get_drvdata(dev);
>  	struct tegra_adma_chan_regs *ch_reg;
> @@ -744,7 +744,7 @@ static int tegra_adma_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int tegra_adma_runtime_resume(struct device *dev)
> +static int __maybe_unused tegra_adma_runtime_resume(struct device *dev)
>  {
>  	struct tegra_adma *tdma = dev_get_drvdata(dev);
>  	struct tegra_adma_chan_regs *ch_reg;
> 

Thanks!

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH] dmaengine: tegra210-adma: Fix unused function warnings
  2019-07-09  8:32 [PATCH] dmaengine: tegra210-adma: Fix unused function warnings YueHaibing
  2019-07-10  8:38 ` Jon Hunter
@ 2019-07-25 13:02 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-07-25 13:02 UTC (permalink / raw)
  To: YueHaibing
  Cc: ldewangan, jonathanh, dan.j.williams, thierry.reding,
	linux-kernel, dmaengine, linux-tegra

On 09-07-19, 16:32, YueHaibing wrote:
> If CONFIG_PM is not set, build warnings:
> 
> drivers/dma/tegra210-adma.c:747:12: warning: tegra_adma_runtime_resume defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_resume(struct device *dev)
> drivers/dma/tegra210-adma.c:715:12: warning: tegra_adma_runtime_suspend defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_suspend(struct device *dev)
> 
> Mark the two function as __maybe_unused.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2019-07-25 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09  8:32 [PATCH] dmaengine: tegra210-adma: Fix unused function warnings YueHaibing
2019-07-10  8:38 ` Jon Hunter
2019-07-25 13:02 ` Vinod Koul

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).