From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 14 Oct 2022 18:42:13 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ojNlG-008iDP-2c for lore@lore.pengutronix.de; Fri, 14 Oct 2022 18:42:13 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ojNlD-0006Kx-Cg; Fri, 14 Oct 2022 18:42:11 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojNlB-0006FP-5T; Fri, 14 Oct 2022 18:42:09 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ojNlA-001WTm-DE; Fri, 14 Oct 2022 18:42:08 +0200 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ojNl8-00FzpR-Mu; Fri, 14 Oct 2022 18:42:06 +0200 From: Marco Felsch To: oss-tools@pengutronix.de Date: Fri, 14 Oct 2022 18:41:55 +0200 Message-Id: <20221014164204.3812506-6-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221014164204.3812506-1-m.felsch@pengutronix.de> References: <20221014164204.3812506-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH dt-utils 05/14] state: remove param member from struct state_string 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: , Cc: mfe@pengutronix.de 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.ext.pengutronix.de); SAEximRunCond expanded to false This ports the following barebox commit | commit 4f4d6fc426a466109b7f8b20fb2fdfaad9130aa3 | Author: Christian Eggers | Date: Thu Jan 23 13:20:41 2020 +0100 | | state: remove param member from struct state_string | | After adding the parameter, the pointer isn't required anymore. | | Signed-off-by: Christian Eggers | Signed-off-by: Sascha Hauer Signed-off-by: Marco Felsch --- src/barebox-state/state.h | 1 - src/barebox-state/state_variables.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/barebox-state/state.h b/src/barebox-state/state.h index 912d6d4..40450fe 100644 --- a/src/barebox-state/state.h +++ b/src/barebox-state/state.h @@ -191,7 +191,6 @@ struct state_mac { */ struct state_string { struct state_variable var; - struct param_d *param; char *value; const char *value_default; char raw[]; diff --git a/src/barebox-state/state_variables.c b/src/barebox-state/state_variables.c index 16f630f..18d9884 100644 --- a/src/barebox-state/state_variables.c +++ b/src/barebox-state/state_variables.c @@ -413,6 +413,7 @@ static struct state_variable *state_string_create(struct state *state, { struct state_string *string; uint32_t start_size[2]; + struct param_d *param; int ret; ret = of_property_read_u32_array(node, "reg", start_size, @@ -432,11 +433,11 @@ static struct state_variable *state_string_create(struct state *state, string->var.raw = &string->raw; string->var.state = state; - string->param = dev_add_param_string(&state->dev, name, + param = dev_add_param_string(&state->dev, name, state_string_set, state_string_get, &string->value, &string->var); - if (IS_ERR(string->param)) { - ret = PTR_ERR(string->param); + if (IS_ERR(param)) { + ret = PTR_ERR(param); goto out; } -- 2.30.2