diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-08-25 18:17:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-26 20:39:35 -0400 |
commit | a5ff1b34e16c203397542d98c49c5c7783193946 (patch) | |
tree | 2c526fcfac795f7145d333cbbec1e2839b251e37 | |
parent | ae6c33ba6e37eea3012fe2640b22400ef3f2d0f3 (diff) |
treewide: replace config_enabled() with IS_ENABLED() (2nd round)
Commit 97f2645f358b ("tree-wide: replace config_enabled() with
IS_ENABLED()") mostly killed config_enabled(), but some new users have
appeared for v4.8-rc1. They are all used for a boolean option, so can
be replaced with IS_ENABLED() safely.
Link: http://lkml.kernel.org/r/1471970749-24867-1-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/mips/include/asm/page.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/x86/mm/kaslr.c | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index ea0cd9773914..5f987598054f 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -164,7 +164,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
164 | */ | 164 | */ |
165 | static inline unsigned long ___pa(unsigned long x) | 165 | static inline unsigned long ___pa(unsigned long x) |
166 | { | 166 | { |
167 | if (config_enabled(CONFIG_64BIT)) { | 167 | if (IS_ENABLED(CONFIG_64BIT)) { |
168 | /* | 168 | /* |
169 | * For MIPS64 the virtual address may either be in one of | 169 | * For MIPS64 the virtual address may either be in one of |
170 | * the compatibility segements ckseg0 or ckseg1, or it may | 170 | * the compatibility segements ckseg0 or ckseg1, or it may |
@@ -173,7 +173,7 @@ static inline unsigned long ___pa(unsigned long x) | |||
173 | return x < CKSEG0 ? XPHYSADDR(x) : CPHYSADDR(x); | 173 | return x < CKSEG0 ? XPHYSADDR(x) : CPHYSADDR(x); |
174 | } | 174 | } |
175 | 175 | ||
176 | if (!config_enabled(CONFIG_EVA)) { | 176 | if (!IS_ENABLED(CONFIG_EVA)) { |
177 | /* | 177 | /* |
178 | * We're using the standard MIPS32 legacy memory map, ie. | 178 | * We're using the standard MIPS32 legacy memory map, ie. |
179 | * the address x is going to be in kseg0 or kseg1. We can | 179 | * the address x is going to be in kseg0 or kseg1. We can |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index ba5f456edaa9..7f7ba5f23f13 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -204,11 +204,9 @@ static void __init conmode_default(void) | |||
204 | #endif | 204 | #endif |
205 | } | 205 | } |
206 | } else if (MACHINE_IS_KVM) { | 206 | } else if (MACHINE_IS_KVM) { |
207 | if (sclp.has_vt220 && | 207 | if (sclp.has_vt220 && IS_ENABLED(CONFIG_SCLP_VT220_CONSOLE)) |
208 | config_enabled(CONFIG_SCLP_VT220_CONSOLE)) | ||
209 | SET_CONSOLE_VT220; | 208 | SET_CONSOLE_VT220; |
210 | else if (sclp.has_linemode && | 209 | else if (sclp.has_linemode && IS_ENABLED(CONFIG_SCLP_CONSOLE)) |
211 | config_enabled(CONFIG_SCLP_CONSOLE)) | ||
212 | SET_CONSOLE_SCLP; | 210 | SET_CONSOLE_SCLP; |
213 | else | 211 | else |
214 | SET_CONSOLE_HVC; | 212 | SET_CONSOLE_HVC; |
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c index ec8654f117d8..bda8d5eef04d 100644 --- a/arch/x86/mm/kaslr.c +++ b/arch/x86/mm/kaslr.c | |||
@@ -77,7 +77,7 @@ static inline unsigned long get_padding(struct kaslr_memory_region *region) | |||
77 | */ | 77 | */ |
78 | static inline bool kaslr_memory_enabled(void) | 78 | static inline bool kaslr_memory_enabled(void) |
79 | { | 79 | { |
80 | return kaslr_enabled() && !config_enabled(CONFIG_KASAN); | 80 | return kaslr_enabled() && !IS_ENABLED(CONFIG_KASAN); |
81 | } | 81 | } |
82 | 82 | ||
83 | /* Initialize base and padding for each memory region randomized with KASLR */ | 83 | /* Initialize base and padding for each memory region randomized with KASLR */ |