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

Configure Feed

Select the types of activity you want to include in your feed.

of: Compare property names by of_prop_cmp() in of_alias_scan()

For these pseudo property names 'name', 'phandle' and 'linux,phandle':

Use dedicated property name comparison macro of_prop_cmp() instead of
strcmp() in of_alias_scan() to:

- Make property name comparison consistent.
- Prepare for introducing private is_pseudo_property() later.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250224-of_bugfix-v1-1-03640ae8c3a6@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Zijun Hu and committed by
Rob Herring (Arm)
56d733bb a46a0805

+3 -3
+3 -3
drivers/of/base.c
··· 1855 1855 int id, len; 1856 1856 1857 1857 /* Skip those we do not want to proceed */ 1858 - if (!strcmp(pp->name, "name") || 1859 - !strcmp(pp->name, "phandle") || 1860 - !strcmp(pp->name, "linux,phandle")) 1858 + if (!of_prop_cmp(pp->name, "name") || 1859 + !of_prop_cmp(pp->name, "phandle") || 1860 + !of_prop_cmp(pp->name, "linux,phandle")) 1861 1861 continue; 1862 1862 1863 1863 np = of_find_node_by_path(pp->value);