Re: [PATCH v2 1/4] dma: Add devm_dma_request_chan()

From: Csókás Bence
Date: Mon Feb 03 2025 - 08:10:16 EST


Hi,

On 2025. 02. 03. 13:27, Alexander Dahl wrote:
+ if (!IS_ERR(chan))
+ ret = devm_add_action_or_reset(dev, dmaenginem_release_channel, chan);

Why not using dma_release_channel() directly here? What's the point
of introducing dmaenginem_release_channel() further above?

I followed the existing practice, used by `dmaenginem_async_device_unregister()`. I suspect it was done like this because the devm callback function's signature takes a `void *` and not `struct dma_chan *`.

Bence