Skip to content

Commit

Permalink
powerpc/mm: Parenthesise IS_ENABLED() in if condition
Browse files Browse the repository at this point in the history
Currently IS_ENABLED() produces an expression surrounded by parentheses,
which allows this code to compile, generating eg:

    else if (1 || 0)
        hpte_init_native();

However a change to the macro in the kbuild tree will break this in
future by removing the parentheses.

Fixes: 7353644 ("powerpc/mm: Fix build break when PPC_NATIVE=n")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Stephen Rothwell authored and Michael Ellerman committed Jul 28, 2016
1 parent 00dab81 commit fbef66f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ void __init hash__early_init_mmu(void)
ps3_early_mm_init();
else if (firmware_has_feature(FW_FEATURE_LPAR))
hpte_init_pseries();
else if IS_ENABLED(CONFIG_PPC_NATIVE)
else if (IS_ENABLED(CONFIG_PPC_NATIVE))
hpte_init_native();

if (!mmu_hash_ops.hpte_insert)
Expand Down

0 comments on commit fbef66f

Please sign in to comment.