Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Qi Zheng and committed by
Rob Herring
7536c7e0 67e35adf

-4
-4
drivers/of/fdt.c
··· 643 643 offset = fdt_next_node(blob, offset, &depth)) { 644 644 645 645 pathp = fdt_get_name(blob, offset, NULL); 646 - if (*pathp == '/') 647 - pathp = kbasename(pathp); 648 646 rc = it(offset, pathp, depth, data); 649 647 } 650 648 return rc; ··· 669 671 int rc; 670 672 671 673 pathp = fdt_get_name(blob, node, NULL); 672 - if (*pathp == '/') 673 - pathp = kbasename(pathp); 674 674 rc = it(node, pathp, data); 675 675 if (rc) 676 676 return rc;