Skip to contentSkip to conversation

dmaengine: tegra-apb: mark PM functions as __maybe_unused

PATCH Applied YueHaibing 4 participants 4 messages Mar 20, 2020 – Mar 23, 2020

Subsystems (3)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 dmaengine: tegra-apb: mark PM functions as __maybe_unused

When CONFIG_PM is disabled, gcc warning this:

drivers/dma/tegra20-apb-dma.c:1587:12: warning: 'tegra_dma_runtime_resume' defined but not used [-Wunused-function] drivers/dma/tegra20-apb-dma.c:1578:12: warning: 'tegra_dma_runtime_suspend' defined but not used [-Wunused-function]

Make it as __maybe_unused to fix the warnings,
also remove unneeded function declarations.

Fixes ec8a1586780c ("dma: tegra: add dmaengine based dma driver")
---
 drivers/dma/tegra20-apb-dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/dma/tegra20-apb-dma.c +2 -4
index 4e295d121be6..b33000976f66 100644
@@ -263,8 +263,6 @@ static inline struct device *tdc2dev(struct tegra_dma_channel *tdc)
 }
 
 static dma_cookie_t tegra_dma_tx_submit(struct dma_async_tx_descriptor *tx);
-static int tegra_dma_runtime_suspend(struct device *dev);
-static int tegra_dma_runtime_resume(struct device *dev);
 
 /* Get DMA desc from free list, if not there then allocate it.  */
 static struct tegra_dma_desc *tegra_dma_desc_get(struct tegra_dma_channel *tdc)
@@ -1575,7 +1573,7 @@ static int tegra_dma_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int tegra_dma_runtime_suspend(struct device *dev)
+static int __maybe_unused tegra_dma_runtime_suspend(struct device *dev)
 {
 	struct tegra_dma *tdma = dev_get_drvdata(dev);
 
@@ -1584,7 +1582,7 @@ static int tegra_dma_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int tegra_dma_runtime_resume(struct device *dev)
+static int __maybe_unused tegra_dma_runtime_resume(struct device *dev)
 {
 	struct tegra_dma *tdma = dev_get_drvdata(dev);
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

20.03.2020 10:13, YueHaibing пишет:

Quoted 11 lines

When CONFIG_PM is disabled, gcc warning this:

drivers/dma/tegra20-apb-dma.c:1587:12: warning: 'tegra_dma_runtime_resume' defined but not used [-Wunused-function] drivers/dma/tegra20-apb-dma.c:1578:12: warning: 'tegra_dma_runtime_suspend' defined but not used [-Wunused-function]

Make it as __maybe_unused to fix the warnings,
also remove unneeded function declarations.

Fixes ec8a1586780c ("dma: tegra: add dmaengine based dma driver")

---

...

Looks good, thank you:

Acked-by on v1 1/1
#2 lore raw
In reply to YueHaibing
Quoted 5 lines · YueHaibing

When CONFIG_PM is disabled, gcc warning this:

drivers/dma/tegra20-apb-dma.c:1587:12: warning: 'tegra_dma_runtime_resume' defined but not used [-Wunused-function] drivers/dma/tegra20-apb-dma.c:1578:12: warning: 'tegra_dma_runtime_suspend' defined but not used [-Wunused-function]

Quoted 8 lines

Make it as __maybe_unused to fix the warnings,
also remove unneeded function declarations.

Fixes ec8a1586780c ("dma: tegra: add dmaengine based dma driver")
---
 drivers/dma/tegra20-apb-dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
maintainer Applied
#3 lore raw
In reply to YueHaibing
Quoted 7 lines · YueHaibing

When CONFIG_PM is disabled, gcc warning this:

drivers/dma/tegra20-apb-dma.c:1587:12: warning: 'tegra_dma_runtime_resume' defined but not used [-Wunused-function] drivers/dma/tegra20-apb-dma.c:1578:12: warning: 'tegra_dma_runtime_suspend' defined but not used [-Wunused-function]

Make it as __maybe_unused to fix the warnings,
also remove unneeded function declarations.

Applied, thanks

Signature · 1 line
~Vinod