coreinfo: Use IS_ENABLED() to query Kconfig variables

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_.+?)\b,if IS_ENABLED\($1\),g' `find . -name *.[ch]`
perl -pi -e 's,ifndef (CONFIG_.+?)\b,if !IS_ENABLED\($1\),g' `find . -name *.[ch]`

Change-Id: Ia461a33541f58ff39e984119c44ece7e6c05608a
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10713
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Stefan Reinauer
2015-06-29 16:08:39 -07:00
parent d13fd1b013
commit 04fb7a81c1
10 changed files with 22 additions and 22 deletions

View File

@ -20,7 +20,7 @@
#include "coreinfo.h"
#include <coreboot_tables.h>
#ifdef CONFIG_MODULE_COREBOOT
#if IS_ENABLED(CONFIG_MODULE_COREBOOT)
#define MAX_MEMORY_COUNT 5