From 05f552043c9f8175e2a3bdc91cfd782e477dc2e2 Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Wed, 31 May 2023 15:14:21 +0300 Subject: [PATCH] smbios.c: remove unnecessary code --- lib/smbios.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/lib/smbios.c b/lib/smbios.c index ca9d58feaa..c856aac4ed 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -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; -- 2.39.5