Thread (7 messages) flat view 7 messages, 3 authors, 10d ago

Re: [PATCH 2/2] dmaengine: add union chan_dev for dma_chan::dev for clarity

From: Logan Gunthorpe <logang@deltatee.com>
Date: 2026-08-13 17:34:46
Also in: dmaengine, imx, linux-mips, linux-sunxi, linux-tegra, linux-trace-kernel, lkml


On 2026-08-12 3:24 p.m., Frank.Li@oss.nxp.com wrote:
From: Frank Li <Frank.Li@nxp.com>

The current dma_chan structure contains both "device" and "dev". So

chan->device->dev refers to the DMA engine device.
chan->dev->device refers to the per-channel device instance.

Their similar naming makes the distinction unclear and increases reader
confusion.

Add union dma_chan::chan_dev to make its purpose explicit and clearly
identify it as the per-channel device. After all user switch to chan_dev,
union and dma_chan::dev will be removed.

Update the kernel-doc accordingly. Besides its sysfs usage, the per-channel
device is also used by some DMA engine drivers for IOMMU mapping and
therefore deserves a more accurate description.

No functional change intended.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Thanks, I've often been confused by this myself. I'm glad you're
cleaning it up and making progress.

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help