Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55908 )
Change subject: arch/x86/smbios.c Move calculation next to usage ......................................................................
arch/x86/smbios.c Move calculation next to usage
Change-Id: I949da86605e76b186ef2fdbfbc112b71544b694a Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/55908 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/arch/x86/smbios.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 8e780fd..96b5789 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -635,7 +635,6 @@ t->serial_number = smbios_add_string(t->eos, smbios_processor_serial_number()); t->status = SMBIOS_PROCESSOR_STATUS_CPU_ENABLED | SMBIOS_PROCESSOR_STATUS_POPULATED; t->processor_upgrade = get_socket_type(); - const int len = t->length + smbios_string_table_len(t->eos); if (cpu_have_cpuid() && cpuid_get_max_func() >= 0x16) { t->current_speed = cpuid_eax(0x16); /* base frequency */ t->external_clock = cpuid_ecx(0x16); @@ -668,6 +667,7 @@ if (cpu_voltage > 0) t->voltage = 0x80 | cpu_voltage;
+ const int len = t->length + smbios_string_table_len(t->eos); *current += len; return len; }