Skip to contentSkip to conversation

dmaengine: dw-edma: Remove dw_edma_add_irq_mask()

PATCH RESEND Applied Devendra K Verma 2 participants 2 messages Jun 8 – Jun 11

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

PATCH RESEND v2 1/1 dmaengine: dw-edma: Remove dw_edma_add_irq_mask()

Function dw_edma_add_irq_mask() sets the mask of the interrupts alloted to read / write channels in a variable. The mask set for read / write channels is niether used nor this function is called else where, making it redundant. The redundant function can be removed safely as it is not affecting anything.

---
Changes in v1:
- corrected the missing tags pointed by reviewers.

---
 drivers/dma/dw-edma/dw-edma-core.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/dma/dw-edma/dw-edma-core.c +0 -11
index c2feb3adc79f..89a4c498a17b 100644
@@ -988,20 +988,12 @@ static inline void dw_edma_dec_irq_alloc(int *nr_irqs, u32 *alloc, u16 cnt)
 	}
 }
 
-static inline void dw_edma_add_irq_mask(u32 *mask, u32 alloc, u16 cnt)
-{
-	while (*mask * alloc < cnt)
-		(*mask)++;
-}
-
 static int dw_edma_irq_request(struct dw_edma *dw,
 			       u32 *wr_alloc, u32 *rd_alloc)
 {
 	struct dw_edma_chip *chip = dw->chip;
 	struct device *dev = dw->chip->dev;
 	struct msi_desc *msi_desc;
-	u32 wr_mask = 1;
-	u32 rd_mask = 1;
 	int i, err = 0;
 	u32 ch_cnt;
 	int irq;
@@ -1038,9 +1030,6 @@ static int dw_edma_irq_request(struct dw_edma *dw,
 			dw_edma_dec_irq_alloc(&tmp, rd_alloc, dw->rd_ch_cnt);
 		}
 
-		dw_edma_add_irq_mask(&wr_mask, *wr_alloc, dw->wr_ch_cnt);
-		dw_edma_add_irq_mask(&rd_mask, *rd_alloc, dw->rd_ch_cnt);
-
 		for (i = 0; i < (*wr_alloc + *rd_alloc); i++) {
 			irq = chip->ops->irq_vector(dev, i);
 			err = request_irq(irq,
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Devendra K Verma

Function dw_edma_add_irq_mask() sets the mask of the interrupts alloted to read / write channels in a variable. The mask set for read / write channels is niether used nor this function is called else where, making it redundant. The redundant function can be removed safely as it is not affecting anything.

[...]

Applied, thanks!

[1/1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()

      commit: 57e766bd3ddb2495d80952ad4fc723fb538e1d43

Best regards,

Signature · 1 line
~Vinod