From: "Csókás Bence" <csokas.bence@prolan.hu>
To: Markus Elfring <Markus.Elfring@web.de>,
<dmaengine@vger.kernel.org>, <linux-sunxi@lists.linux.dev>,
<linux-arm-kernel@lists.infradead.org>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Chen-Yu Tsai <wens@kernel.org>,
Samuel Holland <samuel@sholland.org>,
Vinod Koul <vkoul@kernel.org>
Subject: Re: [v4] dma-engine: sun4i: Use devm functions in probe()
Date: Wed, 12 Mar 2025 13:30:45 +0100 [thread overview]
Message-ID: <505c2e3b-f1bb-4e3a-96f2-eef0d0d682e6@prolan.hu> (raw)
In-Reply-To: <9ef781b0-8a63-42b7-91a2-fa8a8ea3c0b4@web.de>
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
next prev parent reply other threads:[~2025-03-12 12:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 18:02 [PATCH v4] dma-engine: sun4i: Use devm functions in probe() Bence Csókás
2025-03-11 19:33 ` Markus Elfring
2025-03-11 19:54 ` Markus Elfring
2025-03-12 8:53 ` Csókás Bence
2025-03-12 11:44 ` [v4] " Markus Elfring
2025-03-12 12:30 ` Csókás Bence [this message]
2025-03-22 18:46 ` [PATCH v4] " Csókás Bence
2025-03-22 19:13 ` Christophe JAILLET
2025-03-22 19:35 ` Csókás Bence
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505c2e3b-f1bb-4e3a-96f2-eef0d0d682e6@prolan.hu \
--to=csokas.bence@prolan.hu \
--cc=Markus.Elfring@web.de \
--cc=dmaengine@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=vkoul@kernel.org \
--cc=wens@csie.org \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox