Re: [PATCH 05/10] soc: qcom: rpm_master_stats: Use __cleanup() for device_node pointers
From: Krzysztof Kozlowski
Date: Tue Nov 18 2025 - 06:47:23 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/rpm_master_stats.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/rpm_master_stats.c b/drivers/soc/qcom/rpm_master_stats.c
> index c7788337e1647da386e874bcb87313e8f07241df..06a1d3fe5e9b4295018b0e5cbcf738c0e9e83c3b 100644
> --- a/drivers/soc/qcom/rpm_master_stats.c
> +++ b/drivers/soc/qcom/rpm_master_stats.c
> @@ -67,9 +67,9 @@ DEFINE_SHOW_ATTRIBUTE(master_stats);
>
> static int master_stats_probe(struct platform_device *pdev)
> {
> + struct device_node *msgram_np __free(device_node) = NULL;
NAK, stop with this pattern.
You are not simplifying anything here!
Best regards,
Krzysztof