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

From: Krzysztof Kozlowski
Date: Tue Nov 18 2025 - 06:49:44 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/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