From: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/10] soc: qcom: aoss: Use __cleanup() for device_node pointers
Date: Tue, 18 Nov 2025 20:48:33 +0530 [thread overview]
Message-ID: <e6d26f57-1871-48f0-9db5-8f2b21fb3635@oss.qualcomm.com> (raw)
In-Reply-To: <c966f8a6-2dd1-4e73-9016-c6b08d7e0337@kernel.org>
On 11/18/2025 6:02 PM, Krzysztof Kozlowski wrote:
> On 18/11/2025 13:25, Dmitry Baryshkov wrote:
>> On Tue, Nov 18, 2025 at 12:39:51PM +0100, Krzysztof Kozlowski wrote:
>>> On 17/11/2025 12:35, Konrad Dybcio wrote:
>>>> On 11/17/25 5:51 AM, Kathiravan Thirumoorthy wrote:
>>>>> Make use of the __cleanup() attribute for device_node pointers to simplify
>>>>> resource management and remove explicit of_node_put() calls.
>>>>>
>>>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>>>> ---
>>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> This is obviously wrong and not helpful patch.
>> Describing why it is wrong would be helpful (or having a pointer to an
>> explanation). Bear in mind people who read email archives and find this
>> very brief note.
> I gave some rationale in other patches, but summarizing:
> 1. It is against cleanup.h - author did not bother to read it - which
> clearly asks for constructor with declaration.
Thanks for pointing this out. I understood that w/o NULL initialization
we will be freeing some dangling pointers but looks like there are other
cases also. I agree that I overlooked the details in cleanup.h.Apologies
for the oversight and for taking up everyone’s time. Will take care of
this going forward!
> This was discussed many
> times in the list, including many bugs and explicit checkpatch warning
> (on LKML) because people don't bother to read cleanup.h.
>
> 2. It makes simple get+put code complicated, not simpler.
>
> 3. It grows the scope of OF reference without benefits.
>
> 4. This driver was already reviewed and simplified so author should go
> back and think why this was left alone (would save a lot of trouble).
>
> Best regards,
> Krzysztof
next prev parent reply other threads:[~2025-11-18 15:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 4:51 [PATCH 00/10] soc: qcom: " Kathiravan Thirumoorthy
2025-11-17 4:51 ` [PATCH 01/10] soc: qcom: aoss: " Kathiravan Thirumoorthy
2025-11-17 11:35 ` Konrad Dybcio
2025-11-18 11:39 ` Krzysztof Kozlowski
2025-11-18 12:25 ` Dmitry Baryshkov
2025-11-18 12:32 ` Krzysztof Kozlowski
2025-11-18 12:52 ` Dmitry Baryshkov
2025-11-18 13:16 ` Konrad Dybcio
2025-11-18 13:25 ` Krzysztof Kozlowski
2025-11-18 15:18 ` Kathiravan Thirumoorthy [this message]
2025-11-18 11:38 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 02/10] soc: qcom: gsbi: " Kathiravan Thirumoorthy
2025-11-17 11:35 ` Konrad Dybcio
2025-11-18 11:38 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 03/10] soc: qcom: pd-mapper: " Kathiravan Thirumoorthy
2025-11-17 11:36 ` Konrad Dybcio
2025-11-18 11:43 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 04/10] soc: qcom: rpm-proc: " Kathiravan Thirumoorthy
2025-11-17 11:36 ` Konrad Dybcio
2025-11-18 11:40 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 05/10] soc: qcom: rpm_master_stats: " Kathiravan Thirumoorthy
2025-11-17 11:37 ` Konrad Dybcio
2025-11-18 11:40 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 06/10] soc: qcom: smem: " Kathiravan Thirumoorthy
2025-11-17 11:37 ` Konrad Dybcio
2025-11-18 11:42 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 07/10] soc: qcom: smp2p: " Kathiravan Thirumoorthy
2025-11-17 11:37 ` Konrad Dybcio
2025-11-18 11:41 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 08/10] soc: qcom: smsm: " Kathiravan Thirumoorthy
2025-11-17 11:38 ` Konrad Dybcio
2025-11-18 11:42 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 09/10] soc: qcom: spm: " Kathiravan Thirumoorthy
2025-11-17 11:38 ` Konrad Dybcio
2025-11-18 11:42 ` Krzysztof Kozlowski
2025-11-17 4:51 ` [PATCH 10/10] soc: qcom: ubwc: " Kathiravan Thirumoorthy
2025-11-17 11:39 ` Konrad Dybcio
2025-11-18 11:43 ` Krzysztof Kozlowski
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=e6d26f57-1871-48f0-9db5-8f2b21fb3635@oss.qualcomm.com \
--to=kathiravan.thirumoorthy@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®