]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
smbios: do not determine maximum structure size
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 31 Jan 2024 22:42:35 +0000 (23:42 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 2 Feb 2024 18:57:45 +0000 (19:57 +0100)
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>
lib/smbios.c

index cd750cc218a4bb4d9d93284b8cc420b0c9c30a0c..327f78c8b05709649a2186f139c6641ad1733aa2 100644 (file)
@@ -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);
        }
 
        /*