[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aUF6CdS6WVZuEP24@vaman>
Date: Tue, 16 Dec 2025 20:56:01 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: jeanmichel.hautbois@...eli.org, Angelo Dureghello <angelo@...am.it>,
Greg Ungerer <gerg@...ux-m68k.org>, imx@...ts.linux.dev,
dmaengine@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] dma: mcf-edma: Add per-channel IRQ naming for
debugging
On 26-11-25, 11:12, Frank Li wrote:
> On Wed, Nov 26, 2025 at 09:36:03AM +0100, Jean-Michel Hautbois via B4 Relay wrote:
> > From: Jean-Michel Hautbois <jeanmichel.hautbois@...eli.org>
> >
> > Add dynamic per-channel IRQ naming to make DMA interrupt identification
> > easier in /proc/interrupts and debugging tools.
> >
> > Instead of all channels showing "eDMA", they now show:
> > - "eDMA-0" through "eDMA-15" for channels 0-15
> > - "eDMA-16" through "eDMA-55" for channels 16-55
> > - "eDMA-tx-56" for the shared channel 56-63 interrupt
> > - "eDMA-err" for the error interrupt
> >
> > This aids debugging DMA issues by making it clear which channel's
> > interrupt is being serviced.
> >
> > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@...eli.org>
> > ---
> > drivers/dma/mcf-edma-main.c | 26 ++++++++++++++++++--------
> > 1 file changed, 18 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/dma/mcf-edma-main.c b/drivers/dma/mcf-edma-main.c
> > index f95114829d80..6a7d88895501 100644
> > --- a/drivers/dma/mcf-edma-main.c
> > +++ b/drivers/dma/mcf-edma-main.c
> > @@ -81,8 +81,14 @@ static int mcf_edma_irq_init(struct platform_device *pdev,
> > if (!res)
> > return -1;
> >
> > - for (ret = 0, i = res->start; i <= res->end; ++i)
> > - ret |= request_irq(i, mcf_edma_tx_handler, 0, "eDMA", mcf_edma);
> > + for (ret = 0, i = res->start; i <= res->end; ++i) {
> > + char *irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
> > + "eDMA-%d", (int)(i - res->start));
> > + if (!irq_name)
> > + return -ENOMEM;
> > +
> > + ret |= request_irq(i, mcf_edma_tx_handler, 0, irq_name, mcf_edma);
> > + }
> > if (ret)
> > return ret;
>
> The existing code have problem, it should use devm_request_irq(). if one
> irq request failure, return here, requested irq will not free.
Why is that an error!
>
> You'd better add patch before this one to change to use devm_request_irq()
Not really, devm_ is a not always good option.
--
~Vinod
Powered by blists - more mailing lists