public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Kathiravan Thirumoorthy
	<kathiravan.thirumoorthy@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 13:32:51 +0100	[thread overview]
Message-ID: <c966f8a6-2dd1-4e73-9016-c6b08d7e0337@kernel.org> (raw)
In-Reply-To: <d5sn56mlwaae2hou7t6pr24h2pojvjcv4ufsxg4lbbnk6vlpfi@xc5e5uekofbt>

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. 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

  reply	other threads:[~2025-11-18 12:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  4:51 [PATCH 00/10] soc: qcom: Use __cleanup() for device_node pointers 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 [this message]
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
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=c966f8a6-2dd1-4e73-9016-c6b08d7e0337@kernel.org \
    --to=krzk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kathiravan.thirumoorthy@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@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