Skip to contentSkip to conversation

dmaengine: pch_dma: remove unused function chan2parent

PATCH Applied Colin Ian King 2 participants 2 messages Mar 8, 2024 – Apr 7, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: pch_dma: remove unused function chan2parent

The helper function chan2parent is not used and has never been used since the first commit to the code back in 2010. The function is redundant and can be removed.

Cleans up clang scan build warning:
drivers/dma/pch_dma.c:158:30: warning: unused function 'chan2parent' [-Wunused-function]

---
 drivers/dma/pch_dma.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/dma/pch_dma.c +0 -5
index c359decc07a3..6b2793b07694 100644
@@ -155,11 +155,6 @@ static inline struct device *chan2dev(struct dma_chan *chan)
 	return &chan->dev->device;
 }
 
-static inline struct device *chan2parent(struct dma_chan *chan)
-{
-	return chan->dev->device.parent;
-}
-
 static inline
 struct pch_dma_desc *pdc_first_active(struct pch_dma_chan *pd_chan)
 {
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw
Quoted 8 lines · Colin Ian King

The helper function chan2parent is not used and has never been used since the first commit to the code back in 2010. The function is redundant and can be removed.

Cleans up clang scan build warning:
drivers/dma/pch_dma.c:158:30: warning: unused function 'chan2parent' [-Wunused-function]

[...]

Applied, thanks!

[1/1] dmaengine: pch_dma: remove unused function chan2parent

      commit: 4665be0e952f68306cc6fba2cce68b940a7ec78c

Best regards,

Signature · 1 line
~Vinod