diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-01-31 23:42:35 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-02-02 19:57:45 +0100 |
commit | e494258deddcae4a6805abfbb643b2fdc8ac3736 (patch) | |
tree | 9b075785a02d25f6571b9b42e50ae96164d10f0c /lib/smbios.c | |
parent | 551bc96be51c183ee90770bec985990bc6bcc4ad (diff) |
smbios: do not determine maximum structure size
Only the SMBIOS 2.1 entry point has a field for the maximum structure size.
As we have switched to an SMBIOS 3 entry point remove the superfluous
calculation.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/smbios.c')
-rw-r--r-- | lib/smbios.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/smbios.c b/lib/smbios.c index cd750cc218a..327f78c8b05 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -566,7 +566,6 @@ ulong write_smbios_table(ulong addr) struct smbios_ctx ctx; ulong tables; int len = 0; - int max_struct_size = 0; int handle = 0; int i; @@ -588,7 +587,6 @@ ulong write_smbios_table(ulong addr) /* populate minimum required tables */ for (i = 0; i < ARRAY_SIZE(smbios_write_funcs); i++) { const struct smbios_write_method *method; - int tmp; method = &smbios_write_funcs[i]; ctx.subnode_name = NULL; @@ -598,10 +596,7 @@ ulong write_smbios_table(ulong addr) ctx.node = ofnode_find_subnode(parent_node, method->subnode_name); } - tmp = method->write((ulong *)&addr, handle++, &ctx); - - max_struct_size = max(max_struct_size, tmp); - len += tmp; + len += method->write((ulong *)&addr, handle++, &ctx); } /* |