Skip to contentSkip to conversation

dmaengine: dw-edma: Remove dw_edma_add_irq_mask()

PATCH Superseded Devendra K Verma 3 participants 5 messages May 21 – May 26

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

Function dw_edma_add_irq_mask() is not used anywhere. The output of the function is not used hence it is redundant and can be removed safely.

---
 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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Devendra K Verma

Function dw_edma_add_irq_mask() is not used anywhere. The output of the function is not used hence it is redundant and can be removed safely.
---

Quoted 41 lines
 drivers/dma/dw-edma/dw-edma-core.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/dma/dw-edma/dw-edma-core.c +0 -12
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,
--

2.43.0

#2 lore raw
In reply to Devendra K Verma
Quoted 3 lines · Devendra K Verma

Function dw_edma_add_irq_mask() is not used anywhere. The output of the function is not used hence it is redundant and can be removed safely.

Where is your s-o-b tag?

- Mani

Quoted 42 lines
---
 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
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#3 lore raw
Quoted 7 lines · Manivannan Sadhasivam
Quoted 3 lines · Devendra K Verma

Function dw_edma_add_irq_mask() is not used anywhere. The output of the function is not used hence it is redundant and can be removed safely.

Where is your s-o-b tag?

Also, if you had used scripts/get_maintainer.pl or b4, you would've added '[email protected] ' list to CC.

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
#4 lore raw

Public

Hi

Thank you Manivannan for pointing out the missing tag. The ''[email protected]' is already part of the CC list.

Thank you Frank Li for reviewing the code.

I will update the v2 patch and float for review.

Regards,
Devendra

Quoted 26 lines

-----Original Message-----
From: Manivannan Sadhasivam <[email protected]>
Sent: Sunday, May 24, 2026 08:45
To: Verma, Devendra <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Simek, Michal <[email protected]>
Subject: Re: [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()

Quoted 7 lines · Manivannan Sadhasivam
Quoted 3 lines · Devendra K Verma

Function dw_edma_add_irq_mask() is not used anywhere. The output of the function is not used hence it is redundant and can be removed safely.

Where is your s-o-b tag?

Also, if you had used scripts/get_maintainer.pl or b4, you would've added '[email protected] ' list to CC.

- Mani

--
மணிவண்ணன் சதாசிவம்