Re: [PATCH v3 2/4] dmaengine: use dma_chan_name() helper to get per-channel device name

From: Andy Shevchenko

Date: Sat Sep 05 2026 - 03:57:20 EST


On Fri, Sep 04, 2026 at 05:49:44PM -0400, Frank.Li@xxxxxxxxxxx wrote:

> Use the existing dma_chan_name() helper to obtain the per-channel device
> name instead of open-coding: dev_name(chan->dev->device) /
> dev_name(chan2dev())
>
> Simplify the code and improve consistency.
>
> No functional change intended.

...

> @@ -507,7 +507,7 @@ static int idma64_alloc_chan_resources(struct dma_chan *chan)
> struct idma64_chan *idma64c = to_idma64_chan(chan);
>
> /* Create a pool of consistent memory blocks for hardware descriptors */
> - idma64c->pool = dma_pool_create(dev_name(chan2dev(chan)),
> + idma64c->pool = dma_pool_create(dma_chan_name(chan),
> chan->device->dev,
> sizeof(struct idma64_lli), 8, 0);

For example here it may now be condensed to less LoC:

idma64c->pool = dma_pool_create(dma_chan_name(chan), chan->device->dev,
sizeof(struct idma64_lli), 8, 0);

Consider that in case you will need a new version (no need
to address it separately).

--
With Best Regards,
Andy Shevchenko