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: Move of_prop_val_eq() next to the single user

There's only a single user of of_prop_val_eq(), so move it to overlay.c.
This removes one case of exposing struct property outside of the DT
code.

Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250312212947.1067337-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

+6 -6
+6
drivers/of/overlay.c
··· 84 84 #define DTSF_APPLY_FAIL 0x01 85 85 #define DTSF_REVERT_FAIL 0x02 86 86 87 + static int of_prop_val_eq(const struct property *p1, const struct property *p2) 88 + { 89 + return p1->length == p2->length && 90 + !memcmp(p1->value, p2->value, (size_t)p1->length); 91 + } 92 + 87 93 /* 88 94 * If a changeset apply or revert encounters an error, an attempt will 89 95 * be made to undo partial changes, but may fail. If the undo fails
-6
include/linux/of.h
··· 908 908 #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) 909 909 #endif 910 910 911 - static inline int of_prop_val_eq(const struct property *p1, const struct property *p2) 912 - { 913 - return p1->length == p2->length && 914 - !memcmp(p1->value, p2->value, (size_t)p1->length); 915 - } 916 - 917 911 #define for_each_property_of_node(dn, pp) \ 918 912 for (pp = dn->properties; pp != NULL; pp = pp->next) 919 913