Skip to contentSkip to conversation

of:Use remote_parent instead of remote

PATCH In review logic.yu 2 participants 2 messages Apr 22, 2023 – Apr 25, 2023 Device tree

lore
Share & tools
lore

logic.yu

author
#0 lore raw

PATCH 1/1 of:Use remote_parent instead of remote

Since the parent node of the remote node is obtained here, it is more reasonable to change it to the remote_parent

---
 drivers/of/property.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/of/property.c +8 -8
index ddc75cd50825..ee5f0c008b40 100644
@@ -835,7 +835,7 @@ EXPORT_SYMBOL(of_graph_get_endpoint_count);
 struct device_node *of_graph_get_remote_node(const struct device_node *node,
 					     u32 port, u32 endpoint)
 {
-	struct device_node *endpoint_node, *remote;
+	struct device_node *endpoint_node, *remote_parent;
 
 	endpoint_node = of_graph_get_endpoint_by_regs(node, port, endpoint);
 	if (!endpoint_node) {
@@ -844,20 +844,20 @@ struct device_node *of_graph_get_remote_node(const struct device_node *node,
 		return NULL;
 	}
 
-	remote = of_graph_get_remote_port_parent(endpoint_node);
+	remote_parent = of_graph_get_remote_port_parent(endpoint_node);
 	of_node_put(endpoint_node);
-	if (!remote) {
-		pr_debug("no valid remote node\n");
+	if (!remote_parent) {
+		pr_debug("no valid remote_parent node\n");
 		return NULL;
 	}
 
-	if (!of_device_is_available(remote)) {
-		pr_debug("not available for remote node\n");
-		of_node_put(remote);
+	if (!of_device_is_available(remote_parent)) {
+		pr_debug("not available for remote_parent node\n");
+		of_node_put(remote_parent);
 		return NULL;
 	}
 
-	return remote;
+	return remote_parent;
 }
 EXPORT_SYMBOL(of_graph_get_remote_node);
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 2 lines · logic.yu

Since the parent node of the remote node is obtained here, it is more reasonable to change it to the remote_parent

Would have been a better name, but not really worth changing as it then changes the authorship of the lines in 'git blame'.

Rob