[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7db92cad-0a65-4e2c-85ed-6fe03de71dc5@kernel.org>
Date: Tue, 18 Nov 2025 12:42:07 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/10] soc: qcom: smsm: Use __cleanup() for device_node
pointers
On 17/11/2025 05:51, Kathiravan Thirumoorthy wrote:
> Apply the __cleanup() attribute to device_node pointers to simplify
> resource management and remove explicit of_node_put() calls.
>
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
> ---
> drivers/soc/qcom/smsm.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
> index 021e9d1f61dc5200514c5a239d52be97f7e82825..5600712f9185bba8c82da431cfb9f21f1bc44761 100644
> --- a/drivers/soc/qcom/smsm.c
> +++ b/drivers/soc/qcom/smsm.c
> @@ -397,7 +397,7 @@ static int smsm_parse_mbox(struct qcom_smsm *smsm, unsigned int host_id)
> */
> static int smsm_parse_ipc(struct qcom_smsm *smsm, unsigned host_id)
> {
> - struct device_node *syscon;
> + struct device_node *syscon __free(device_node) = NULL;
NAK, stop with this pattern.
You are not simplifying anything here!
Best regards,
Krzysztof
Powered by blists - more mailing lists