Skip to content

Commit 79d9f96

Browse files
chleroymcgrof
authored andcommitted
powerpc: Simplify strict_kernel_rwx_enabled()
Now that rodata_enabled is always declared, remove #ifdef and define a single version of strict_kernel_rwx_enabled(). Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 315df9c commit 79d9f96

File tree

1 file changed

+1
-8
lines changed
  • arch/powerpc/include/asm

1 file changed

+1
-8
lines changed

arch/powerpc/include/asm/mmu.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,17 +330,10 @@ static __always_inline bool early_radix_enabled(void)
330330
return early_mmu_has_feature(MMU_FTR_TYPE_RADIX);
331331
}
332332

333-
#ifdef CONFIG_STRICT_KERNEL_RWX
334333
static inline bool strict_kernel_rwx_enabled(void)
335334
{
336-
return rodata_enabled;
335+
return IS_ENABLED(CONFIG_STRICT_KERNEL_RWX) && rodata_enabled;
337336
}
338-
#else
339-
static inline bool strict_kernel_rwx_enabled(void)
340-
{
341-
return false;
342-
}
343-
#endif
344337

345338
static inline bool strict_module_rwx_enabled(void)
346339
{

0 commit comments

Comments
 (0)