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

From: Andy Shevchenko

Date: Thu Nov 19 2026 - 12:36:29 EST


On Thu, Nov 19, 2026 at 06:27:40PM +0100, Markus Elfring wrote:
> >> Reuse existing functionality from devm_clk_get_optional_enabled()
> >> instead of keeping duplicate source code.
> >>
> >> The source code was transformed by using the Coccinelle software.
> >
> > Something is wrong with your tools or scripts. It now brings a regression.
> Would you like to extend background information?

You are not the first year in this project, find the answer yourself.
Hint: what devm_*() actually do and when?

> https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/clk.h#L680-L699
> …
> * devm_clk_get_optional_enabled - devm_clk_get_optional() +
> * clk_prepare_enable()
> …

--
With Best Regards,
Andy Shevchenko