]> git.baikalelectronics.ru Git - uboot.git/commitdiff
smbios.c: remove unnecessary code
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 31 May 2023 12:14:21 +0000 (15:14 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Wed, 31 May 2023 12:14:21 +0000 (15:14 +0300)
lib/smbios.c

index ca9d58feaa3bf75c02b6bb48e20947bb59956ccd..c856aac4ed097b9cd8da8446666187e37a7b6696 100644 (file)
@@ -181,29 +181,6 @@ static void smbios_set_eos(struct smbios_ctx *ctx, char *eos)
 
 int smbios_update_version(const char *version)
 {
-//     char *ptr = gd->smbios_version;
-//     uint old_len, len;
-//
-//     if (!ptr)
-//             return log_ret(-ENOENT);
-//
-//     /*
-//      * This string is supposed to have at least enough bytes and is
-//      * padded with spaces. Update it, taking care not to move the
-//      * \0 terminator, so that other strings in the string table
-//      * are not disturbed. See smbios_add_string()
-//      */
-//     old_len = strnlen(ptr, SMBIOS_STR_MAX);
-//     len = strnlen(version, SMBIOS_STR_MAX);
-//     if (len > old_len)
-//             return log_ret(-ENOSPC);
-//
-//     log_debug("Replacing SMBIOS type 0 version string '%s'\n", ptr);
-//     memcpy(ptr, version, len);
-//#ifdef LOG_DEBUG
-//     print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
-//#endif
-//
        return 0;
 }
 
@@ -236,14 +213,6 @@ static int smbios_write_type0(ulong *current, int handle,
        t->bios_ver = smbios_add_prop(ctx, "version");
        if (!t->bios_ver)
                t->bios_ver = smbios_add_string(ctx, PLAIN_VERSION);
-//     if (t->bios_ver)
-//             gd->smbios_version = ctx->last_str;
-//     log_debug("smbios_version = %p: '%s'\n", gd->smbios_version,
-//               gd->smbios_version);
-#ifdef LOG_DEBUG
-//     print_buffer((ulong)gd->smbios_version, gd->smbios_version,
-//                  1, strlen(gd->smbios_version) + 1, 0);
-#endif
        t->bios_release_date = smbios_add_string(ctx, U_BOOT_DMI_DATE);
 #ifdef CONFIG_ROM_SIZE
        t->bios_rom_size = (CONFIG_ROM_SIZE / 65536) - 1;
@@ -538,8 +507,6 @@ ulong write_smbios_table(ulong addr)
        }
        // Structure Table Address is 32-bit physical starting address of the
        // read-only SMBIOS Structure Table
-//     se->struct_table_address = table_addr;
-//     se->struct_table_address = table_addr - 0xa0000000;
        se->struct_table_address = virt_to_phys(table_addr);
 
        se->struct_count = handle;