Skip to contentSkip to conversation

of: Add dummy for of_node_is_root if not CONFIG_OF

PATCH In review Douglas Anderson 4 participants 7 messages May 7, 2019 – May 8, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: Add dummy for of_node_is_root if not CONFIG_OF

We'll add a dummy to just return false.

---

 include/linux/of.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/of.h +5 -0
index 0cf857012f11..62ae5c1cafa5 100644
@@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
 	return false;
 }
 
+static inline bool of_node_is_root(const struct device_node *node)
+{
+	return false;
+}
+
 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
 					const char *compatible)
 {
Signature · 1 line
2.21.0.1020.gf2820cf01a-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Douglas Anderson

We'll add a dummy to just return false.

Quoted 24 lines

---

 include/linux/of.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/of.h +5 -1
index 0cf857012f11..62ae5c1cafa5 100644
@@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
        return false;
 }
 
+static inline bool of_node_is_root(const struct device_node *node)
+{
+       return false;
+}
+
 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
                                        const char *compatible)
 {
--

2.21.0.1020.gf2820cf01a-goog

#2 lore raw
In reply to Douglas Anderson
Quoted 1 line · Douglas Anderson

We'll add a dummy to just return false.

A more complete explanation of why this is needed please.

My one guess would be compile testing of arch/sparc/kernel/prom_64.c fails???

-Frank

Quoted 24 lines

---

 include/linux/of.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/of.h +5 -0
index 0cf857012f11..62ae5c1cafa5 100644
@@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
 	return false;
 }
 
+static inline bool of_node_is_root(const struct device_node *node)
+{
+	return false;
+}
+
 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
 					const char *compatible)
 {
#4 lore raw
Quoted 5 lines · Doug Anderson
Quoted 4 lines · Frank Rowand
Quoted 1 line · Douglas Anderson

We'll add a dummy to just return false.

Quoted 8 lines
Quoted 4 lines

A more complete explanation of why this is needed please.

My one guess would be compile testing of arch/sparc/kernel/prom_64.c fails???

Ah, sorry. Needed for:

https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com

Should I take both patches via pstore, or should both go via DT tree?

Signature · 1 line
Kees Cook
#5 lore raw
In reply to Doug Anderson
Quoted 8 lines · Doug Anderson

Hi,

Quoted 4 lines · Frank Rowand
Quoted 1 line · Douglas Anderson

We'll add a dummy to just return false.

Quoted 8 lines
Quoted 4 lines

A more complete explanation of why this is needed please.

My one guess would be compile testing of arch/sparc/kernel/prom_64.c fails???

Ah, sorry. Needed for:

https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com

Got it. I went and looked at that. I think a better approach would be to check parent node not "/reserved-memory". I am making this suggestion in that email thread.

-Frank

Quoted 6 lines

-Doug
.

#6 lore raw

Hi,

Quoted 15 lines · Frank Rowand
Quoted 13 lines · Doug Anderson

Hi,

Quoted 8 lines · Frank Rowand
Quoted 1 line · Douglas Anderson

We'll add a dummy to just return false.

A more complete explanation of why this is needed please.

My one guess would be compile testing of arch/sparc/kernel/prom_64.c fails???

Quoted 7 lines
Quoted 3 lines

Ah, sorry. Needed for:

https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com

Got it. I went and looked at that. I think a better approach would be to check parent node not "/reserved-memory". I am making this suggestion in that email thread.

OK. Assuming that people are happy with that approach [1], we should consider this patch abandoned. Thanks for your reviews!

[1] https://lkml.kernel.org/r/[email protected]

-Doug