From: Vinod Koul <vkoul@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: jeanmichel.hautbois@yoseli.org,
Angelo Dureghello <angelo@sysam.it>,
Greg Ungerer <gerg@linux-m68k.org>,
imx@lists.linux.dev, dmaengine@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] dma: mcf-edma: Add per-channel IRQ naming for debugging
Date: Tue, 16 Dec 2025 20:56:01 +0530 [thread overview]
Message-ID: <aUF6CdS6WVZuEP24@vaman> (raw)
In-Reply-To: <aScnArV/22L5VmxP@lizhi-Precision-Tower-5810>
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@yoseli.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@yoseli.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
next prev parent reply other threads:[~2025-12-16 15:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 8:36 [PATCH v2 0/5] dma: fsl/mcf-edma: Bug fixes and enhancements for ColdFire support Jean-Michel Hautbois via B4 Relay
2025-11-26 8:36 ` [PATCH v2 1/5] dma: fsl-edma: Add FSL_EDMA_DRV_MCF flag for ColdFire eDMA Jean-Michel Hautbois via B4 Relay
2025-11-26 8:36 ` [PATCH v2 2/5] dma: mcf-edma: Add per-channel IRQ naming for debugging Jean-Michel Hautbois via B4 Relay
2025-11-26 16:12 ` Frank Li
2025-12-16 15:26 ` Vinod Koul [this message]
2025-12-16 15:38 ` Frank Li
2025-12-17 6:34 ` Jean-Michel Hautbois
2025-12-17 16:21 ` Frank Li
2025-11-26 8:36 ` [PATCH v2 3/5] dma: mcf-edma: Fix interrupt handler for 64 DMA channels Jean-Michel Hautbois via B4 Relay
2025-11-26 8:36 ` [PATCH v2 4/5] dma: fsl-edma: Move error handler out of header file Jean-Michel Hautbois via B4 Relay
2025-11-26 8:36 ` [PATCH v2 5/5] dma: mcf-edma: Fix error handler for all 64 DMA channels Jean-Michel Hautbois via B4 Relay
2025-11-26 16:14 ` Frank Li
2025-12-16 15:27 ` [PATCH v2 0/5] dma: fsl/mcf-edma: Bug fixes and enhancements for ColdFire support Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aUF6CdS6WVZuEP24@vaman \
--to=vkoul@kernel.org \
--cc=Frank.li@nxp.com \
--cc=angelo@sysam.it \
--cc=dmaengine@vger.kernel.org \
--cc=gerg@linux-m68k.org \
--cc=imx@lists.linux.dev \
--cc=jeanmichel.hautbois@yoseli.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox