Skip to content

Commit 38de368

Browse files
committed
dmaengine: ti: k3-udma: annotate pm function with __maybe_unused
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: fbe0514 ("dmaengine: ti: k3-udma: Add system suspend/resume support") Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0642287 commit 38de368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5527,7 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
55275527
return ret;
55285528
}
55295529

5530-
static int udma_pm_suspend(struct device *dev)
5530+
static int __maybe_unused udma_pm_suspend(struct device *dev)
55315531
{
55325532
struct udma_dev *ud = dev_get_drvdata(dev);
55335533
struct dma_device *dma_dev = &ud->ddev;
@@ -5549,7 +5549,7 @@ static int udma_pm_suspend(struct device *dev)
55495549
return 0;
55505550
}
55515551

5552-
static int udma_pm_resume(struct device *dev)
5552+
static int __maybe_unused udma_pm_resume(struct device *dev)
55535553
{
55545554
struct udma_dev *ud = dev_get_drvdata(dev);
55555555
struct dma_device *dma_dev = &ud->ddev;

0 commit comments

Comments
 (0)