# Re: \[PATCH v3 0/4\] dmaengine: rename dma\_chan::dev to dma\_chan::chan\_dev for clarity

- From: Andy Shevchenko \<andriy.shevchenko@linux.intel.com\>
- Date: 2026-09-05 08:00:52 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/09/17518065
- Thread: https://ratatoskr.run/linux-arm-kernel/2026/09/17516931/t.md

```text
On Fri, Sep 04, 2026 at 05:49:42PM -0400, Frank.Li@oss.nxp.com wrote:
> 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.
> 
> 1st patch add help vchan_chan_name()
> 2nd patch use existing helper dma_chan_name() to reduce rename difference.
> 3rd patch add (dmaengine|vchan)_chan_dev() helper
> 4th patch add union chan_dev for dma_chan::dev for clarity
> 
> Need following patch to clean other dma engineer driver, which is not
> in drivers/dma
> 
> After complete all rename work, dma_chan::dev can be removed.

Nice work!
I have one comment against patch 4/4, after addressing that feel free to add
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
to the entire series.

-- 
With Best Regards,
Andy Shevchenko


```
