From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/8] state: cosmetic fix reverse christmas tree order
Date: Fri, 14 Oct 2022 18:35:30 +0200 [thread overview]
Message-ID: <20221014163534.3812272-5-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20221014163534.3812272-1-m.felsch@pengutronix.de>
No functional change, just apply the common code standards.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
common/state/state.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/common/state/state.c b/common/state/state.c
index d954f0d453..65e47524a3 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -41,11 +41,11 @@ static LIST_HEAD(state_list);
*/
int state_save(struct state *state)
{
- void *buf;
- ssize_t len;
- int ret;
struct state_backend_storage_bucket *bucket;
struct state_backend_storage *storage;
+ ssize_t len;
+ void *buf;
+ int ret;
if (!state->dirty)
return 0;
@@ -212,13 +212,13 @@ static int state_convert_node_variable(struct state *state,
const char *parent_name,
enum state_convert conv)
{
+ struct device_node *new_node = NULL;
const struct variable_type *vtype;
+ char *short_name, *name, *indexs;
+ unsigned int start_size[2];
struct device_node *child;
- struct device_node *new_node = NULL;
struct state_variable *sv;
const char *type_name;
- char *short_name, *name, *indexs;
- unsigned int start_size[2];
int ret;
/* strip trailing @<ADDRESS> */
@@ -341,8 +341,8 @@ struct device_node *state_to_node(struct state *state,
struct device_node *parent,
enum state_convert conv)
{
- struct device_node *child;
struct device_node *root, *state_root;
+ struct device_node *child;
int ret;
state_root = of_find_node_by_path(state->of_path);
@@ -369,8 +369,8 @@ int state_from_node(struct state *state, struct device_node *node, bool create)
{
struct device_node *child;
enum state_convert conv;
- int ret;
uint32_t magic;
+ int ret;
ret = of_property_read_u32(node, "magic", &magic);
if (ret)
@@ -428,12 +428,12 @@ int state_from_node(struct state *state, struct device_node *node, bool create)
static int of_state_fixup(struct device_node *root, void *ctx)
{
- struct state *state = ctx;
- const char *compatible = "barebox,state";
struct device_node *new_node, *node, *parent, *backend_node, *aliases;
+ const char *compatible = "barebox,state";
+ struct state *state = ctx;
struct property *p;
- int ret;
phandle phandle;
+ int ret;
node = of_find_node_by_path_from(root, state->of_path);
if (node) {
@@ -587,15 +587,15 @@ void state_release(struct state *state)
*/
struct state *state_new_from_node(struct device_node *node, bool readonly)
{
- struct state *state;
- int ret = 0;
- const char *backend_type;
+ struct device_node *backend_node;
const char *storage_type = NULL;
- const char *alias;
+ const char *backend_type;
+ struct state *state;
uint32_t stridesize;
- struct device_node *backend_node;
+ const char *alias;
off_t offset = 0;
size_t size = 0;
+ int ret = 0;
alias = of_alias_get(node);
if (!alias) {
--
2.30.2
next prev parent reply other threads:[~2022-10-14 16:37 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 ` [PATCH 3/8] state: rename partition_node to backend_node Marco Felsch
2022-10-14 16:35 ` Marco Felsch [this message]
2022-10-19 7:55 ` [PATCH 4/8] state: cosmetic fix reverse christmas tree order 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-5-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