lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86c6bb52-921e-4644-82fe-474f63fc565e@kernel.org>
Date: Tue, 18 Nov 2025 12:38:26 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>,
 Bjorn Andersson <andersson@...nel.org>,
 Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware: qcom: scm: Use __cleanup() for device_node
 pointers

On 17/11/2025 17:22, Kathiravan Thirumoorthy wrote:
> Make use of the __cleanup() attribute for device_node pointers to simplify
> resource management and remove explicit of_node_put() calls.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
> ---
>  drivers/firmware/qcom/qcom_scm.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index e777b7cb9b127944fe112f453cae9cbc40c06cae..7c1fffa8e7ad48b294b90e7e63f726d0ba7d55e1 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -1746,7 +1746,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_gpu_init_regs);
>  
>  static int qcom_scm_find_dload_address(struct device *dev, u64 *addr)
>  {
> -	struct device_node *tcsr;
> +	struct device_node *tcsr __free(device_node) = NULL;


NAK.

This is wrong syntax. This must come with constructor.

Don't use cleanup.h if you do not understand its syntax. You just lead
to worse code and encourage bugs.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ