Re: [PATCH] dmaengine: ti: k3-udma: annotate pm function with __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxx>

> Fixes: fbe05149e40b ("dmaengine: ti: k3-udma: Add system suspend/resume support")
> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux