Skip to contentSkip to conversation

of: base: Add of_get_next_child_with_prefix() stub

PATCH Applied Bjorn Helgaas 3 participants 3 messages Sep 25, 2025 – Sep 29, 2025 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: base: Add of_get_next_child_with_prefix() stub

From: Bjorn Helgaas <[email protected]>

1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()") added of_get_next_child_with_prefix() but did not add a stub for the !CONFIG_OF case.

Add a of_get_next_child_with_prefix() stub so users of for_each_child_of_node_with_prefix() can be built for compile testing even when !CONFIG_OF.

Fixes 1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()")
---
 include/linux/of.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/of.h +7 -0
index a62154aeda1b..5e2c6ed9370a 100644
@@ -550,6 +550,13 @@ static inline struct device_node *of_get_next_child(
 	return NULL;
 }
 
+static inline struct device_node *of_get_next_child_with_prefix(
+	const struct device_node *node, struct device_node *prev,
+	const char *prefix)
+{
+	return NULL;
+}
+
 static inline struct device_node *of_get_next_available_child(
 	const struct device_node *node, struct device_node *prev)
 {
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()") added of_get_next_child_with_prefix() but did not add a stub for the !CONFIG_OF case.

Add a of_get_next_child_with_prefix() stub so users of for_each_child_of_node_with_prefix() can be built for compile testing even when !CONFIG_OF.

Quoted 6 lines
Fixes 1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()")
---
 include/linux/of.h | 7 +++++++
 1 file changed, 7 insertions(+)

Applied, thanks!

Reviewed-by on v1 1/1
#2 lore raw
In reply to Bjorn Helgaas

Il 25/09/25 21:56, Bjorn Helgaas ha scritto:

Quoted 6 lines

From: Bjorn Helgaas <[email protected]>

1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()") added of_get_next_child_with_prefix() but did not add a stub for the !CONFIG_OF case.

Quoted 6 lines

Add a of_get_next_child_with_prefix() stub so users of for_each_child_of_node_with_prefix() can be built for compile testing even when !CONFIG_OF.

Fixes 1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()")
Quoted 22 lines
---
  include/linux/of.h | 7 +++++++
  1 file changed, 7 insertions(+)
include/linux/of.h +7 -0
index a62154aeda1b..5e2c6ed9370a 100644
@@ -550,6 +550,13 @@ static inline struct device_node *of_get_next_child(
  	return NULL;
  }
 
+static inline struct device_node *of_get_next_child_with_prefix(
+	const struct device_node *node, struct device_node *prev,
+	const char *prefix)
+{
+	return NULL;
+}
+
  static inline struct device_node *of_get_next_available_child(
  	const struct device_node *node, struct device_node *prev)
  {