diff options
author | Qi Zheng <arch0.zheng@gmail.com> | 2020-05-28 21:25:41 +0800 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2020-05-28 20:57:17 -0600 |
commit | 7536c7e03e745bcc6881d0af66e747040943560a (patch) | |
tree | 317c45e97d26a98a498956486790fe3baa382150 /drivers/of/fdt.c | |
parent | 67e35adf1b059a909a0800669736f74650464119 (diff) | |
download | linux-7536c7e03e745bcc6881d0af66e747040943560a.tar.gz linux-7536c7e03e745bcc6881d0af66e747040943560a.tar.bz2 linux-7536c7e03e745bcc6881d0af66e747040943560a.zip |
of/fdt: Remove redundant kbasename function call
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@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 38619e9ef6b2..4602e467ca8b 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; @@ -671,8 +669,6 @@ int __init of_scan_flat_dt_subnodes(unsigned long parent, int rc; pathp = fdt_get_name(blob, node, NULL); - if (*pathp == '/') - pathp = kbasename(pathp); rc = it(node, pathp, data); if (rc) return rc; |