Skip to contentSkip to conversation

of: make of_node_check_flag() device_node parameter const

PATCH Applied Nathan Lynch 2 participants 2 messages Oct 14, 2021 – Oct 20, 2021 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: make of_node_check_flag() device_node parameter const

The device_node argument isn't modified by of_node_check_flag(), so mark it const.

---
 include/linux/of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/of.h +1 -1
index 6f1c41f109bb..ac3a5dcbf9e1 100644
@@ -185,7 +185,7 @@ static inline bool of_node_is_root(const struct device_node *node)
 	return node && (node->parent == NULL);
 }
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
+static inline int of_node_check_flag(const struct device_node *n, unsigned long flag)
 {
 	return test_bit(flag, &n->_flags);
 }
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Nathan Lynch

The device_node argument isn't modified by of_node_check_flag(), so mark it const.

---
 include/linux/of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!