From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 27 Feb 2024 15:26:15 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1reyPP-00AlB0-2F for lore@lore.pengutronix.de; Tue, 27 Feb 2024 15:26:15 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1reyPO-000413-Br; Tue, 27 Feb 2024 15:26:14 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1reyPM-00040B-Js for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reyPM-003Dbc-6y for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1reyPM-00AA21-0U for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 From: Marco Felsch To: oss-tools@pengutronix.de Date: Tue, 27 Feb 2024 15:26:07 +0100 Message-Id: <20240227142611.2421711-3-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240227142611.2421711-1-m.felsch@pengutronix.de> References: <20240227142611.2421711-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH dt-utils 2/6] state: don't mix goto labels and statements on same line X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false This is a partial port of: | commit a81a28f9be1c9d40c20add6a4093d260df8c6049 | Author: Ahmad Fatoum | 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 | Link: https://lore.barebox.org/20230519100120.2365970-2-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer Signed-off-by: Marco Felsch --- 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