mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: oss-tools@pengutronix.de
Subject: [OSS-Tools] [PATCH dt-utils 2/6] state: don't mix goto labels and statements on same line
Date: Tue, 27 Feb 2024 15:26:07 +0100	[thread overview]
Message-ID: <20240227142611.2421711-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20240227142611.2421711-1-m.felsch@pengutronix.de>

This is a partial port of:

| commit a81a28f9be1c9d40c20add6a4093d260df8c6049
| Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
| Date:   Fri May 19 12:01:15 2023 +0200
|
|     treewide: don't mix goto labels and statements on same line
|
|     Coding style across the project is not to indent goto labels and
|     to not mix them with code on the same line. Let's fix the few outliers
|     that are there.
|
|     No functional change.
|
|     Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|     Link: https://lore.barebox.org/20230519100120.2365970-2-a.fatoum@pengutronix.de
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 src/barebox-state/state.c           | 12 ++++++++----
 src/barebox-state/state_variables.c |  9 ++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c
index 3b02624be756..13d406e6a38b 100644
--- a/src/barebox-state/state.c
+++ b/src/barebox-state/state.c
@@ -335,8 +335,10 @@ static int state_convert_node_variable(struct state *state,
 		goto out;
 
 	return 0;
- out_free:free(name);
- out:	return ret;
+out_free:
+	free(name);
+out:
+	return ret;
 }
 
 struct device_node *state_to_node(struct state *state,
@@ -363,7 +365,8 @@ struct device_node *state_to_node(struct state *state,
 	}
 
 	return root;
- out:	of_delete_node(root);
+out:
+	of_delete_node(root);
 	return ERR_PTR(ret);
 }
 
@@ -563,7 +566,8 @@ static int of_state_fixup(struct device_node *root, void *ctx)
 
 	return 0;
 
- out:	of_delete_node(new_node);
+out:
+	of_delete_node(new_node);
 	return ret;
 }
 
diff --git a/src/barebox-state/state_variables.c b/src/barebox-state/state_variables.c
index a94ccce9b739..daceef6bf427 100644
--- a/src/barebox-state/state_variables.c
+++ b/src/barebox-state/state_variables.c
@@ -264,7 +264,8 @@ static struct state_variable *state_enum32_create(struct state *state,
 	}
 
 	return &enum32->var;
- out:	for (i--; i >= 0; i--)
+out:
+	for (i--; i >= 0; i--)
 		free((char *)enum32->names[i]);
 	free(enum32->names);
 	free(enum32);
@@ -330,7 +331,8 @@ static struct state_variable *state_mac_create(struct state *state,
 	}
 
 	return &mac->var;
- out:	free(mac);
+out:
+	free(mac);
 	return ERR_PTR(ret);
 }
 
@@ -445,7 +447,8 @@ static struct state_variable *state_string_create(struct state *state,
 	}
 
 	return &string->var;
- out:	free(string);
+out:
+	free(string);
 	return ERR_PTR(ret);
 }
 
-- 
2.39.2




  parent reply	other threads:[~2024-02-27 14:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 14:26 [OSS-Tools] [PATCH dt-utils 0/6] barebox-state sync Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 1/6] state: align state_backend_bucket_direct_create with barebox Marco Felsch
2024-02-27 14:26 ` Marco Felsch [this message]
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 3/6] state: drop null pointer checks around of_delete_node Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 4/6] treewide: rename struct device_d to device Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 5/6] state: make uninitialized state less verbose Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 6/6] state: backend_bucket_direct: add debug prints on read/write 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=20240227142611.2421711-3-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /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