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

From: Krzysztof Kozlowski
Date: Tue Nov 18 2025 - 06:49:15 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/smem.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index fef840b5457407a85051ded0e835430dbebfe8bb..6c3a08e1afe824402f6fbb84c9695ee57eda230b 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -1100,8 +1100,8 @@ static int qcom_smem_map_global(struct qcom_smem *smem, u32 size)
> static int qcom_smem_resolve_mem(struct qcom_smem *smem, const char *name,
> struct smem_region *region)
> {
> + struct device_node *np __free(device_node) = NULL;



Absolutely none of your patches is correct. ZERO. You did not understand
how cleanup.h works but decided to send all of this.

Best regards,
Krzysztof