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

From: Krzysztof Kozlowski
Date: Tue Nov 18 2025 - 06:48:46 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/spm.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
> index f75659fff2874fb6a29c48ceee862b05b1ba5802..a87a8593a8b7fb2c62b14eaa9c96f46fc5eba877 100644
> --- a/drivers/soc/qcom/spm.c
> +++ b/drivers/soc/qcom/spm.c
> @@ -391,7 +391,8 @@ static int spm_get_cpu(struct device *dev)
> bool found;
>
> for_each_possible_cpu(cpu) {
> - struct device_node *cpu_node, *saw_node;
> + struct device_node *cpu_node __free(device_node) = NULL;
> + struct device_node *saw_node __free(device_node) = NULL;
>


This is getting ridicilous. NAK, stop with this pattern.

You are not simplifying anything here!

Best regards,
Krzysztof