Re: [PATCH 07/10] soc: qcom: smp2p: Use __cleanup() for device_node pointers

From: Krzysztof Kozlowski
Date: Tue Nov 18 2025 - 06:49:38 EST


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@xxxxxxxxxxxxxxxx>
> ---
> drivers/soc/qcom/smp2p.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
> index cb515c2340c107e92ece1bb8cd3854abf9f03e4a..2e22eb4728b7412685138fc86e55058b047bcb75 100644
> --- a/drivers/soc/qcom/smp2p.c
> +++ b/drivers/soc/qcom/smp2p.c
> @@ -501,7 +501,7 @@ static int qcom_smp2p_alloc_outbound_item(struct qcom_smp2p *smp2p)
>
> static int smp2p_parse_ipc(struct qcom_smp2p *smp2p)
> {
> - 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