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: <c15b73f1-6045-499e-8b4d-6cf8140e7de0@linaro.org>
Date: Tue, 1 Oct 2024 22:34:23 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Thierry Reding <thierry.reding@...il.com>,
 Jonathan Hunter <jonathanh@...dia.com>, Timo Alho <talho@...dia.com>,
 linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] firmware: tegra: bpmp: use scoped device node
 handling to simplify error paths

On 16/08/2024 15:57, Krzysztof Kozlowski wrote:
> Obtain the device node reference with scoped/cleanup.h to reduce error
> handling and make the code a bit simpler.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  drivers/firmware/tegra/bpmp.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
> index c3a1dc344961..2edc3838538e 100644
> --- a/drivers/firmware/tegra/bpmp.c
> +++ b/drivers/firmware/tegra/bpmp.c
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2016, NVIDIA CORPORATION.  All rights reserved.
>   */
>  
> +#include <linux/cleanup.h>
>  #include <linux/clk/tegra.h>
>  #include <linux/genalloc.h>
>  #include <linux/mailbox_client.h>
> @@ -36,27 +37,22 @@ struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
>  {
>  	struct platform_device *pdev;
>  	struct tegra_bpmp *bpmp;
> -	struct device_node *np;
>  
> -	np = of_parse_phandle(dev->of_node, "nvidia,bpmp", 0);
> +	struct device_node *np __free(device_node) = of_parse_phandle(dev->of_node,
> +								      "nvidia,bpmp", 0);

Uhhh, this is very strange.

Above is correct code which I sent.

But look what was applied:

 struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
 {
+       struct device_node *np __free(device_node);

That's very different.

See commit 8812b8689ee6 ("firmware: tegra: bpmp: Use scoped device node
handling to simplify error paths").

Commit msg does not explain at all why my code was changed. It is not
only a courtesy but also requirement to mark changes done to commits
when applying.

Shall I assume more of my patches were silently changed when applied,
including adding questionable code there?


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ