mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()
@ 2026-05-21 10:06 Devendra K Verma
  2026-05-23 15:19 ` Frank Li
  2026-05-24  3:14 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 5+ messages in thread
From: Devendra K Verma @ 2026-05-21 10:06 UTC (permalink / raw)
  To: bhelgaas, mani, vkoul; +Cc: dmaengine, linux-pci, linux-kernel, michal.simek

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(-)

diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
index c2feb3adc79f..89a4c498a17b 100644
--- a/drivers/dma/dw-edma/dw-edma-core.c
+++ b/drivers/dma/dw-edma/dw-edma-core.c
@@ -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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()
  2026-05-21 10:06 [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask() Devendra K Verma
@ 2026-05-23 15:19 ` Frank Li
  2026-05-24  3:14 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-05-23 15:19 UTC (permalink / raw)
  To: Devendra K Verma
  Cc: bhelgaas, mani, vkoul, dmaengine, linux-pci, linux-kernel, michal.simek

On Thu, May 21, 2026 at 03:36:40PM +0530, Devendra K Verma wrote:
> 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.
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/dma/dw-edma/dw-edma-core.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
> index c2feb3adc79f..89a4c498a17b 100644
> --- a/drivers/dma/dw-edma/dw-edma-core.c
> +++ b/drivers/dma/dw-edma/dw-edma-core.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()
  2026-05-21 10:06 [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask() Devendra K Verma
  2026-05-23 15:19 ` Frank Li
@ 2026-05-24  3:14 ` Manivannan Sadhasivam
  2026-05-24  3:15   ` Manivannan Sadhasivam
  1 sibling, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-05-24  3:14 UTC (permalink / raw)
  To: Devendra K Verma
  Cc: bhelgaas, vkoul, dmaengine, linux-pci, linux-kernel, michal.simek

On Thu, May 21, 2026 at 03:36:40PM +0530, Devendra K Verma wrote:
> 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

> ---
>  drivers/dma/dw-edma/dw-edma-core.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
> index c2feb3adc79f..89a4c498a17b 100644
> --- a/drivers/dma/dw-edma/dw-edma-core.c
> +++ b/drivers/dma/dw-edma/dw-edma-core.c
> @@ -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
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()
  2026-05-24  3:14 ` Manivannan Sadhasivam
@ 2026-05-24  3:15   ` Manivannan Sadhasivam
  2026-05-26  5:30     ` Verma, Devendra
  0 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-05-24  3:15 UTC (permalink / raw)
  To: Devendra K Verma
  Cc: bhelgaas, vkoul, dmaengine, linux-pci, linux-kernel, michal.simek

On Sun, May 24, 2026 at 08:44:00AM +0530, Manivannan Sadhasivam wrote:
> On Thu, May 21, 2026 at 03:36:40PM +0530, Devendra K Verma wrote:
> > 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
'dmaengine@vger.kernel.org ' list to CC.

- Mani

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask()
  2026-05-24  3:15   ` Manivannan Sadhasivam
@ 2026-05-26  5:30     ` Verma, Devendra
  0 siblings, 0 replies; 5+ messages in thread
From: Verma, Devendra @ 2026-05-26  5:30 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: bhelgaas, vkoul, dmaengine, linux-pci, linux-kernel, Simek,
	Michal, Verma, Devendra

Public

Hi

Thank you Manivannan for pointing out the missing tag. The ''dmaengine@vger.kernel.org' 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

> -----Original Message-----
> From: Manivannan Sadhasivam <mani@kernel.org>
> Sent: Sunday, May 24, 2026 08:45
> To: Verma, Devendra <Devendra.Verma@amd.com>
> Cc: bhelgaas@google.com; vkoul@kernel.org; dmaengine@vger.kernel.org;
> linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; Simek, Michal
> <michal.simek@amd.com>
> Subject: Re: [PATCH v1] dmaengine: dw-edma: Remove
> dw_edma_add_irq_mask()
>
> On Sun, May 24, 2026 at 08:44:00AM +0530, Manivannan Sadhasivam wrote:
> > On Thu, May 21, 2026 at 03:36:40PM +0530, Devendra K Verma wrote:
> > > 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
> 'dmaengine@vger.kernel.org ' list to CC.
>
> - Mani
>
> --
> மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-26  5:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-21 10:06 [PATCH v1] dmaengine: dw-edma: Remove dw_edma_add_irq_mask() Devendra K Verma
2026-05-23 15:19 ` Frank Li
2026-05-24  3:14 ` Manivannan Sadhasivam
2026-05-24  3:15   ` Manivannan Sadhasivam
2026-05-26  5:30     ` Verma, Devendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®