aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/smbios.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-16 11:24:09 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-17 03:12:39 +0100
commit9c7c6f7213decfc0d0fee4bbc911a291ee93bcdb (patch)
treed9e23ea1f89f75c6e178734bbe375860515bf3e2 /src/arch/x86/smbios.c
parentd94cff6ab26d482554309041a9317cc3bf5e4b02 (diff)
arch/x86: Fix issues with braces detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl: ERROR: open brace '{' following function declarations go on the next line ERROR: that open brace { should be on the previous line ERROR: else should follow close brace '}' WARNING: braces {} are not necessary for any arm of this statement WARNING: braces {} are not necessary for single statement blocks TEST=Build and run on Galileo Gen2 Change-Id: I13d1967757e106c8300a15baed25d920c52a1a95 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18861 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86/smbios.c')
-rw-r--r--src/arch/x86/smbios.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 864020001e..4b1cb83eab 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -416,11 +416,10 @@ static int smbios_write_type3(unsigned long *current, int handle)
t->bootup_state = SMBIOS_STATE_SAFE;
t->power_supply_state = SMBIOS_STATE_SAFE;
t->thermal_state = SMBIOS_STATE_SAFE;
- if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) {
+ if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP))
t->_type = SMBIOS_ENCLOSURE_NOTEBOOK;
- } else {
+ else
t->_type = SMBIOS_ENCLOSURE_DESKTOP;
- }
t->security_status = SMBIOS_STATE_SAFE;
len = t->length + smbios_string_table_len(t->eos);
*current += len;
@@ -437,9 +436,8 @@ static int smbios_write_type4(unsigned long *current, int handle)
res.eax = res.edx = 0;
res.ebx = 0x10000;
- if (cpu_have_cpuid()) {
+ if (cpu_have_cpuid())
res = cpuid(1);
- }
memset(t, 0, sizeof(struct smbios_type4));
t->type = SMBIOS_PROCESSOR_INFORMATION;