diff options
author | Martin Roth <martinroth@google.com> | 2017-06-24 14:16:38 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-07-06 00:19:37 +0000 |
commit | 1bf55b4070bef2be8259f3153cade27121127b4a (patch) | |
tree | 01df7a81ffbc396d15d1d91ce0de0e54f59573b4 /src/lib/reg_script.c | |
parent | 5764cbbf91cf80c21f7e6b819526ebd074049551 (diff) |
src/lib: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen
in a follow-on commmit.
Change-Id: Idcea3f8b1a4246cb6b29999a84a191a3133e5c78
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/lib/reg_script.c')
-rw-r--r-- | src/lib/reg_script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/reg_script.c b/src/lib/reg_script.c index 8d813b6f8d..56285f1ce1 100644 --- a/src/lib/reg_script.c +++ b/src/lib/reg_script.c @@ -22,7 +22,7 @@ #include <stdint.h> #include <reg_script.h> -#if CONFIG_ARCH_X86 +#if IS_ENABLED(CONFIG_ARCH_X86) #include <cpu/x86/msr.h> #endif @@ -369,7 +369,7 @@ static void reg_script_write_iosf(struct reg_script_context *ctx) static uint64_t reg_script_read_msr(struct reg_script_context *ctx) { -#if CONFIG_ARCH_X86 +#if IS_ENABLED(CONFIG_ARCH_X86) const struct reg_script *step = reg_script_get_step(ctx); msr_t msr = rdmsr(step->reg); uint64_t value = msr.hi; @@ -382,7 +382,7 @@ static uint64_t reg_script_read_msr(struct reg_script_context *ctx) static void reg_script_write_msr(struct reg_script_context *ctx) { -#if CONFIG_ARCH_X86 +#if IS_ENABLED(CONFIG_ARCH_X86) const struct reg_script *step = reg_script_get_step(ctx); msr_t msr; msr.hi = step->value >> 32; |