From 898a77521de97b1e4af9458b82bcc21bc7a6e799 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 1 Jun 2017 11:39:59 -0600 Subject: arch/*: Update Kconfig symbol usage - Update all symbols to use IS_ENABLED() - Update non-romcc usage to use 'if' instead of '#if' where it makes sense. Change-Id: I5a84414d2d1631e35ac91efb67a0d4c1f673bf85 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/20005 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/x86/smbios.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/arch/x86/smbios.c') diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 79279faa79..285027006e 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -29,7 +29,7 @@ #include #include #include -#if CONFIG_CHROMEOS +#if IS_ENABLED(CONFIG_CHROMEOS) #include #endif @@ -309,22 +309,22 @@ static int smbios_write_type0(unsigned long *current, int handle) t->system_bios_major_release = 4; t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED | -#if CONFIG_CARDBUS_PLUGIN_SUPPORT - BIOS_CHARACTERISTICS_PC_CARD | -#endif BIOS_CHARACTERISTICS_SELECTABLE_BOOT | BIOS_CHARACTERISTICS_UPGRADEABLE; -#if CONFIG_HAVE_ACPI_TABLES - t->bios_characteristics_ext1 = BIOS_EXT1_CHARACTERISTICS_ACPI; -#endif + if (IS_ENABLED(CONFIG_CARDBUS_PLUGIN_SUPPORT)) + t->bios_characteristics |= BIOS_CHARACTERISTICS_PC_CARD; + + if (IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)) + t->bios_characteristics_ext1 = BIOS_EXT1_CHARACTERISTICS_ACPI; + t->bios_characteristics_ext2 = BIOS_EXT2_CHARACTERISTICS_TARGET; len = t->length + smbios_string_table_len(t->eos); *current += len; return len; } -#if !CONFIG_SMBIOS_PROVIDED_BY_MOBO +#if !IS_ENABLED(CONFIG_SMBIOS_PROVIDED_BY_MOBO) const char *__attribute__((weak)) smbios_mainboard_serial_number(void) { @@ -623,10 +623,9 @@ unsigned long smbios_write_tables(unsigned long current) handle++)); update_max(len, max_struct_size, smbios_write_type11(¤t, &handle)); -#if CONFIG_ELOG - update_max(len, max_struct_size, elog_smbios_write_type15(¤t, - handle++)); -#endif + if (IS_ENABLED(CONFIG_ELOG)) + update_max(len, max_struct_size, + elog_smbios_write_type15(¤t,handle++)); update_max(len, max_struct_size, smbios_write_type17(¤t, &handle)); update_max(len, max_struct_size, smbios_write_type32(¤t, -- cgit v1.2.3