Hi,
On 2025. 03. 12. 12:44, Markus Elfring wrote:
How good does such a change combination fit to the patch requirement
according to separation of concerns?
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14-rc6#n81
It is a general refactor patch, it shouldn't change any functionality. I could split it to one part introducing `devm_clk_get_enabled()` and the other `dmaenginem_async_device_register()`, but I don't feel that to be necessary, nor does it bring any advantages I believe.
Can it matter a bit more to separate changes for the application of devm functions
and the adjustment of corresponding exception handling with dev_err_probe() calls?
The change in error handling is just the result of switching to devm
functions, because it is no longer needed to separately dev_err(), store
the error code to `ret` and goto a cleanup phase (as the whole point of
using devm functions is to have auto-cleanup), you can just return with
the error code (which dev_err_probe() returns for us) right away. The
devm functions are used precisely _because_ they allow us to simplify
this error handling.
Regards,
Markus
Bence