aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/coreboot.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-29 15:47:34 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-30 18:55:15 +0200
commit1b4d39428eac80bc76713b1f21a2c85e8900c1b8 (patch)
treee2b9dfea6be47c785fa55964950c691643d0a232 /payloads/libpayload/libc/coreboot.c
parentde60c8899680f362a908d68efe9e4154ab3380be (diff)
libpayload: Make Kconfig bools use IS_ENABLED()
This will make the code work with the different styles of Kconfig (emit unset bools vs don't emit unset bools) Roughly, the patch does this, and a little bit of fixing up: perl -pi -e 's,ifdef (CONFIG_LP_.+?)\b,if IS_ENABLED\($1\),g' `find . -name *.[ch]` perl -pi -e 's,ifndef (CONFIG_LP_.+?)\b,if !IS_ENABLED\($1\),g' `find . -name *.[ch]` Change-Id: Ib8a839b056a1f806a8597052e1b571ea3d18a79f Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10711 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/libc/coreboot.c')
-rw-r--r--payloads/libpayload/libc/coreboot.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 43a9f09f1c..8a5d3ae7f4 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -56,7 +56,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
for (i = 0; i < count; i++) {
struct cb_memory_range *range = MEM_RANGE_PTR(mem, i);
-#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
+#if IS_ENABLED(CONFIG_LP_MEMMAP_RAM_ONLY)
if (range->type != CB_MEM_RAM)
continue;
#endif
@@ -78,7 +78,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
info->serial = ((struct cb_serial *)ptr);
}
-#ifdef CONFIG_LP_CHROMEOS
+#if IS_ENABLED(CONFIG_LP_CHROMEOS)
static void cb_parse_vboot_handoff(unsigned char *ptr, struct sysinfo_t *info)
{
struct lb_range *vbho = (struct lb_range *)ptr;
@@ -160,7 +160,7 @@ static void cb_parse_ram_code(unsigned char *ptr, struct sysinfo_t *info)
info->ram_code = ram_code->ram_code;
}
-#ifdef CONFIG_LP_NVRAM
+#if IS_ENABLED(CONFIG_LP_NVRAM)
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -176,7 +176,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)
}
#endif
-#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
+#if IS_ENABLED(CONFIG_LP_COREBOOT_VIDEO_CONSOLE)
static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -307,7 +307,7 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_ASSEMBLER:
cb_parse_string(ptr, &info->assembler);
break;
-#ifdef CONFIG_LP_NVRAM
+#if IS_ENABLED(CONFIG_LP_NVRAM)
case CB_TAG_CMOS_OPTION_TABLE:
cb_parse_optiontable(ptr, info);
break;
@@ -315,7 +315,7 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_checksum(ptr, info);
break;
#endif
-#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
+#if IS_ENABLED(CONFIG_LP_COREBOOT_VIDEO_CONSOLE)
// FIXME we should warn on serial if coreboot set up a
// framebuffer buf the payload does not know about it.
case CB_TAG_FRAMEBUFFER:
@@ -325,7 +325,7 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
break;
-#ifdef CONFIG_LP_CHROMEOS
+#if IS_ENABLED(CONFIG_LP_CHROMEOS)
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;