All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused
@ 2023-05-16 17:43 Vinod Koul
  2023-05-16 21:36 ` Randy Dunlap
  2023-05-27  5:58 ` Péter Ujfalusi
  0 siblings, 2 replies; 3+ messages in thread
From: Vinod Koul @ 2023-05-16 17:43 UTC (permalink / raw)
  To: dmaengine, Peter Ujfalusi, Vignesh Raghavendra, Georgi Vlaev
  Cc: Vinod Koul, Randy Dunlap

We get a warning when PM is not set:

../drivers/dma/ti/k3-udma.c:5552:12: warning: 'udma_pm_resume' defined but not used [-Wunused-function]
 5552 | static int udma_pm_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~
../drivers/dma/ti/k3-udma.c:5530:12: warning: 'udma_pm_suspend' defined but not used [-Wunused-function]
 5530 | static int udma_pm_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~

Fix this by annotating pm function with __maybe_unused

Fixes: fbe05149e40b ("dmaengine: ti: k3-udma: Add system suspend/resume support")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/dma/ti/k3-udma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fc3a2a05ab7b..b8329a23728d 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -5527,7 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int udma_pm_suspend(struct device *dev)
+static int __maybe_unused udma_pm_suspend(struct device *dev)
 {
 	struct udma_dev *ud = dev_get_drvdata(dev);
 	struct dma_device *dma_dev = &ud->ddev;
@@ -5549,7 +5549,7 @@ static int udma_pm_suspend(struct device *dev)
 	return 0;
 }
 
-static int udma_pm_resume(struct device *dev)
+static int __maybe_unused udma_pm_resume(struct device *dev)
 {
 	struct udma_dev *ud = dev_get_drvdata(dev);
 	struct dma_device *dma_dev = &ud->ddev;
-- 
2.40.1


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

* Re: [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused
  2023-05-16 17:43 [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused Vinod Koul
@ 2023-05-16 21:36 ` Randy Dunlap
  2023-05-27  5:58 ` Péter Ujfalusi
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2023-05-16 21:36 UTC (permalink / raw)
  To: Vinod Koul, dmaengine, Peter Ujfalusi, Vignesh Raghavendra, Georgi Vlaev



On 5/16/23 10:43, Vinod Koul wrote:
> We get a warning when PM is not set:
> 
> ../drivers/dma/ti/k3-udma.c:5552:12: warning: 'udma_pm_resume' defined but not used [-Wunused-function]
>  5552 | static int udma_pm_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~
> ../drivers/dma/ti/k3-udma.c:5530:12: warning: 'udma_pm_suspend' defined but not used [-Wunused-function]
>  5530 | static int udma_pm_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~
> 
> Fix this by annotating pm function with __maybe_unused
> 
> Fixes: fbe05149e40b ("dmaengine: ti: k3-udma: Add system suspend/resume support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/dma/ti/k3-udma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index fc3a2a05ab7b..b8329a23728d 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -5527,7 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int udma_pm_suspend(struct device *dev)
> +static int __maybe_unused udma_pm_suspend(struct device *dev)
>  {
>  	struct udma_dev *ud = dev_get_drvdata(dev);
>  	struct dma_device *dma_dev = &ud->ddev;
> @@ -5549,7 +5549,7 @@ static int udma_pm_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int udma_pm_resume(struct device *dev)
> +static int __maybe_unused udma_pm_resume(struct device *dev)
>  {
>  	struct udma_dev *ud = dev_get_drvdata(dev);
>  	struct dma_device *dma_dev = &ud->ddev;

-- 
~Randy

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

* Re: [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused
  2023-05-16 17:43 [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused Vinod Koul
  2023-05-16 21:36 ` Randy Dunlap
@ 2023-05-27  5:58 ` Péter Ujfalusi
  1 sibling, 0 replies; 3+ messages in thread
From: Péter Ujfalusi @ 2023-05-27  5:58 UTC (permalink / raw)
  To: Vinod Koul, dmaengine, Vignesh Raghavendra, Georgi Vlaev; +Cc: Randy Dunlap



On 5/16/23 20:43, Vinod Koul wrote:
> We get a warning when PM is not set:
> 
> ../drivers/dma/ti/k3-udma.c:5552:12: warning: 'udma_pm_resume' defined but not used [-Wunused-function]
>  5552 | static int udma_pm_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~
> ../drivers/dma/ti/k3-udma.c:5530:12: warning: 'udma_pm_suspend' defined but not used [-Wunused-function]
>  5530 | static int udma_pm_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~
> 
> Fix this by annotating pm function with __maybe_unused

Sorry Vinod for missing the report and not reacting.

Thanks for the fix!

Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Fixes: fbe05149e40b ("dmaengine: ti: k3-udma: Add system suspend/resume support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  drivers/dma/ti/k3-udma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index fc3a2a05ab7b..b8329a23728d 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -5527,7 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int udma_pm_suspend(struct device *dev)
> +static int __maybe_unused udma_pm_suspend(struct device *dev)
>  {
>  	struct udma_dev *ud = dev_get_drvdata(dev);
>  	struct dma_device *dma_dev = &ud->ddev;
> @@ -5549,7 +5549,7 @@ static int udma_pm_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int udma_pm_resume(struct device *dev)
> +static int __maybe_unused udma_pm_resume(struct device *dev)
>  {
>  	struct udma_dev *ud = dev_get_drvdata(dev);
>  	struct dma_device *dma_dev = &ud->ddev;

-- 
Péter

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

end of thread, other threads:[~2023-05-27  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 17:43 [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused Vinod Koul
2023-05-16 21:36 ` Randy Dunlap
2023-05-27  5:58 ` Péter Ujfalusi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.