devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of:Use remote_parent instead of remote
@ 2023-04-22 15:03 logic.yu
  2023-04-25 18:48 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: logic.yu @ 2023-04-22 15:03 UTC (permalink / raw)
  To: robh+dt; +Cc: frowand.list, devicetree, linux-kernel

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

Signed-off-by: logic.yu <hymmsx.yu@gmail.com>
---
 drivers/of/property.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index ddc75cd50825..ee5f0c008b40 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -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);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] of:Use remote_parent instead of remote
  2023-04-22 15:03 [PATCH] of:Use remote_parent instead of remote logic.yu
@ 2023-04-25 18:48 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2023-04-25 18:48 UTC (permalink / raw)
  To: logic.yu; +Cc: frowand.list, devicetree, linux-kernel

On Sat, Apr 22, 2023 at 08:03:43AM -0700, logic.yu wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-25 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-22 15:03 [PATCH] of:Use remote_parent instead of remote logic.yu
2023-04-25 18:48 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).