[PATCH 4/8] state: cosmetic fix reverse christmas tree order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No functional change, just apply the common code standards.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux