[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55c21749-f1db-4979-a634-3c0b7e0103f4@kernel.org>
Date: Tue, 18 Nov 2025 12:38:42 +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 02/10] soc: qcom: gsbi: 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/qcom_gsbi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/qcom_gsbi.c b/drivers/soc/qcom/qcom_gsbi.c
> index a25d1de592f060bbf6e084bd412e3a1ef47558f4..4a195c39e223c1f4cda1becf4542d4c8a79ad688 100644
> --- a/drivers/soc/qcom/qcom_gsbi.c
> +++ b/drivers/soc/qcom/qcom_gsbi.c
> @@ -124,8 +124,8 @@ static const struct of_device_id tcsr_dt_match[] __maybe_unused = {
>
> static int gsbi_probe(struct platform_device *pdev)
> {
> + struct device_node *tcsr_node __free(device_node) = NULL;
NAK. Read first how cleanup.h is supposed to look like and why this
wasn't changed with my patches before.
> struct device_node *node = pdev->dev.of_node;
> - struct device_node *tcsr_node;
> const struct of_device_id *match;
> void __iomem *base;
> struct gsbi_info *gsbi;
> @@ -154,7 +154,6 @@ static int gsbi_probe(struct platform_device *pdev)
> else
> dev_warn(&pdev->dev, "no matching TCSR\n");
>
> - of_node_put(tcsr_node);
> }
> }
>
>
Best regards,
Krzysztof
Powered by blists - more mailing lists