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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 May 2020 21:44:25 +0800
From:   Qi Zheng <arch0.zheng@...il.com>
To:     robh+dt@...nel.org, frowand.list@...il.com, robh@...nel.org
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] of/fdt: Remove redundant kbasename function call

On 2020/5/12 下午11:49, Qi Zheng wrote:
> For version 1 to 3 of the device tree, this is the node full
> path as a zero terminated string, starting with "/". The
> following equation will not hold, since the node name has
> been processed in the fdt_get_name().
> 
> 	*pathp == '/'
> 
> For version 16 and later, this is the node unit name only
> (or an empty string for the root node). So the above
> equation will still not hold.
> 
> So the kbasename() is redundant, just remove it.
> 
> Signed-off-by: Qi Zheng <arch0.zheng@...il.com>
> ---
>   drivers/of/fdt.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 8a8e07a8f03d..ea31b2ae8474 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -643,8 +643,6 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
>   	     offset = fdt_next_node(blob, offset, &depth)) {
>   
>   		pathp = fdt_get_name(blob, offset, NULL);
> -		if (*pathp == '/')
> -			pathp = kbasename(pathp);
>   		rc = it(offset, pathp, depth, data);
>   	}
>   	return rc;
> 

add Rob Herring <robh@...nel.org>.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ