Thread (9 messages) flat view 9 messages, 3 authors, 25m ago

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-09-05 07:55:23
Also in: dmaengine, imx, linux-mips, linux-sunxi, linux-tegra, linux-trace-kernel, lkml

On Fri, Sep 04, 2026 at 05:49:44PM -0400, Frank.Li@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.
...
quoted hunk ↗ jump to hunk
@@ -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


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help