[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <505c2e3b-f1bb-4e3a-96f2-eef0d0d682e6@prolan.hu>
Date: Wed, 12 Mar 2025 13:30:45 +0100
From: Csókás Bence <csokas.bence@...lan.hu>
To: Markus Elfring <Markus.Elfring@....de>, <dmaengine@...r.kernel.org>,
<linux-sunxi@...ts.linux.dev>, <linux-arm-kernel@...ts.infradead.org>,
Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>
CC: LKML <linux-kernel@...r.kernel.org>, Chen-Yu Tsai <wens@...nel.org>,
Samuel Holland <samuel@...lland.org>, Vinod Koul <vkoul@...nel.org>
Subject: Re: [v4] dma-engine: sun4i: Use devm functions in probe()
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
Powered by blists - more mailing lists