powerpc/kernel: Convert mmu_has_feature() to returning bool
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Jul 2016 03:39:42 +0000 (13:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 1 Aug 2016 01:14:58 +0000 (11:14 +1000)
The intention is that the result is only used as a boolean, so enforce
that by changing the return type to bool.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu.h

index 599781e..eb942a4 100644 (file)
@@ -135,9 +135,9 @@ enum {
                0,
 };
 
-static inline int mmu_has_feature(unsigned long feature)
+static inline bool mmu_has_feature(unsigned long feature)
 {
-       return (MMU_FTRS_POSSIBLE & cur_cpu_spec->mmu_features & feature);
+       return !!(MMU_FTRS_POSSIBLE & cur_cpu_spec->mmu_features & feature);
 }
 
 static inline void mmu_clear_feature(unsigned long feature)