mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/8] state: rename partition_node to backend_node
Date: Fri, 14 Oct 2022 18:35:29 +0200	[thread overview]
Message-ID: <20221014163534.3812272-4-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20221014163534.3812272-1-m.felsch@pengutronix.de>

Rename the local variable in preparation of addding support for backends
stored within a partition table. This also aligns the name with the name
used by of_state_fixup().

No functional change.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 common/state/state.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/state/state.c b/common/state/state.c
index a614c849c7..d954f0d453 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -593,7 +593,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	const char *storage_type = NULL;
 	const char *alias;
 	uint32_t stridesize;
-	struct device_node *partition_node;
+	struct device_node *backend_node;
 	off_t offset = 0;
 	size_t size = 0;
 
@@ -607,21 +607,21 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	if (IS_ERR(state))
 		return state;
 
-	partition_node = of_parse_phandle(node, "backend", 0);
-	if (!partition_node) {
+	backend_node = of_parse_phandle(node, "backend", 0);
+	if (!backend_node) {
 		dev_err(&state->dev, "Cannot resolve \"backend\" phandle\n");
 		ret = -EINVAL;
 		goto out_release_state;
 	}
 
 #ifdef __BAREBOX__
-	ret = of_partition_ensure_probed(partition_node);
+	ret = of_partition_ensure_probed(backend_node);
 	if (ret)
 		goto out_release_state;
 
-	ret = of_find_path_by_node(partition_node, &state->backend_path, 0);
+	ret = of_find_path_by_node(backend_node, &state->backend_path, 0);
 #else
-	ret = of_get_devicepath(partition_node, &state->backend_path, &offset, &size);
+	ret = of_get_devicepath(backend_node, &state->backend_path, &offset, &size);
 #endif
 	if (ret) {
 		if (ret != -EPROBE_DEFER)
@@ -630,7 +630,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 		goto out_release_state;
 	}
 
-	state->backend_reproducible_name = of_get_reproducible_name(partition_node);
+	state->backend_reproducible_name = of_get_reproducible_name(backend_node);
 
 	ret = of_property_read_string(node, "backend-type", &backend_type);
 	if (ret) {
-- 
2.30.2




  parent reply	other threads:[~2022-10-14 16:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 16:35 [PATCH 0/8] Barebox-State on-disk partition support Marco Felsch
2022-10-14 16:35 ` [PATCH 1/8] of: of_node_name_eq: correct alignment Marco Felsch
2022-10-20  6:36   ` Sascha Hauer
2022-10-14 16:35 ` [PATCH 2/8] state: select the STATE_DRV when STATE is selected Marco Felsch
2022-10-19  7:48   ` Sascha Hauer
2022-10-19  8:14     ` Marco Felsch
2022-10-14 16:35 ` Marco Felsch [this message]
2022-10-14 16:35 ` [PATCH 4/8] state: cosmetic fix reverse christmas tree order Marco Felsch
2022-10-19  7:55   ` Sascha Hauer
2022-10-19  8:18     ` Marco Felsch
2022-10-14 16:35 ` [PATCH 5/8] state: rename backend members Marco Felsch
2022-10-14 16:35 ` [PATCH 6/8] state: factor out the backend property parsing Marco Felsch
2022-10-14 16:35 ` [PATCH 7/8] of: partition: add a helper to determin if a node is a of-partition Marco Felsch
2022-10-14 16:35 ` [PATCH 8/8] state: add support for new backend format Marco Felsch
2022-10-20  6:35   ` Sascha Hauer
2022-10-14 16:44 ` [PATCH 0/8] Barebox-State on-disk partition support Marco Felsch

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=20221014163534.3812272-4-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.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