diff mbox series

[1/2] smbios: shorten sysinfo_str declarations and use

Message ID 20240111143936.983448-1-ilias.apalodimas@linaro.org
State Accepted
Commit 5e2b472bd029af4a1ca85b04bd4a0c9c4b1a17b8
Headers show
Series [1/2] smbios: shorten sysinfo_str declarations and use | expand

Commit Message

Ilias Apalodimas Jan. 11, 2024, 2:39 p.m. UTC
sysinfo_str is a bit too long and makes indentation weird. Shorten it
to si_str.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/smbios.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--
2.37.2

Comments

Tom Rini Jan. 19, 2024, 4:09 p.m. UTC | #1
On Thu, Jan 11, 2024 at 04:39:35PM +0200, Ilias Apalodimas wrote:

> sysinfo_str is a bit too long and makes indentation weird. Shorten it
> to si_str.
> 
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/lib/smbios.c b/lib/smbios.c
index 41aa936c4c41..47db410a2141 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -48,20 +48,20 @@  DECLARE_GLOBAL_DATA_PTR;
 /**
  * struct map_sysinfo - Mapping of sysinfo strings to DT
  *
- * @sysinfo_str: sysinfo string
+ * @si_str: sysinfo string
  * @dt_str: DT string
  * @max: Max index of the tokenized string to pick. Counting starts from 0
  *
  */
 struct map_sysinfo {
-	const char *sysinfo_str;
+	const char *si_str;
 	const char *dt_str;
 	int max;
 };

 static const struct map_sysinfo sysinfo_to_dt[] = {
-	{ .sysinfo_str = "product", .dt_str = "model", 2 },
-	{ .sysinfo_str = "manufacturer", .dt_str = "compatible", 1 },
+	{ .si_str = "product", .dt_str = "model", 2 },
+	{ .si_str = "manufacturer", .dt_str = "compatible", 1 },
 };

 /**
@@ -108,12 +108,12 @@  struct smbios_write_method {
 	const char *subnode_name;
 };

-static const struct map_sysinfo *convert_sysinfo_to_dt(const char *sysinfo_str)
+static const struct map_sysinfo *convert_sysinfo_to_dt(const char *si)
 {
 	int i;

 	for (i = 0; i < ARRAY_SIZE(sysinfo_to_dt); i++) {
-		if (!strcmp(sysinfo_str, sysinfo_to_dt[i].sysinfo_str))
+		if (!strcmp(si, sysinfo_to_dt[i].si_str))
 			return &sysinfo_to_dt[i];
 	}