Re: dmaengine: dw: Use devm_clk_get_optional_enabled() in dw_probe()

From: Markus Elfring

Date: Thu Nov 19 2026 - 13:09:51 EST


>> Do you find these two function calls really not equivalent to another known function call?
>> https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/clk.h#L680-L699
>
> What's your point?

I wonder why the cleanup procedure would need to be different after the proposed refactoring
for the implementation of the function “dw_probe”.
https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/dma/dw/platform.c#L24-L92


> Sashiko just remind you need remove
> clk unprepare at error path

It got the impression that this function call would be still relevant
(behind the label “err_dw_dma_probe”) according to a failed statement “ret = data->probe(chip);”.


> and remove() function

Do you expect more functionality from a devm_clk_get_optional_enabled() call
than from the combination of devm_clk_get_optional() and clk_prepare_enable() so far?

Regards,
Markus


>> …
>>>> --
>>>> Sashiko AI review · https://sashiko.dev/#/patchset/8e3534b7-ae64-4c1f-819d-0ba390737b84@xxxxxx?part=1