devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "logic.yu" <hymmsx.yu@gmail.com>
To: robh+dt@kernel.org
Cc: frowand.list@gmail.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] of:Use remote_parent instead of remote
Date: Sat, 22 Apr 2023 08:03:43 -0700	[thread overview]
Message-ID: <20230422150343.43569-1-hymmsx.yu@gmail.com> (raw)

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


             reply	other threads:[~2023-04-22 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22 15:03 logic.yu [this message]
2023-04-25 18:48 ` [PATCH] of:Use remote_parent instead of remote Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230422150343.43569-1-hymmsx.yu@gmail.com \
    --to=hymmsx.yu@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).