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

Andy Shevchenko andriy.shevchenko at linux.intel.com
Sat Sep 5 00:55:12 PDT 2026


On Fri, Sep 04, 2026 at 05:49:44PM -0400, Frank.Li at oss.nxp.com 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





More information about the linux-arm-kernel mailing list