From: Michael Ellerman Date: Wed, 27 Jul 2016 03:35:15 +0000 (+1000) Subject: powerpc/kernel: Convert cpu_has_feature() to returning bool X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6574ba950bbe9ab2460f8143018d93d15cacf5be;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/kernel: Convert cpu_has_feature() to returning bool 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 --- diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index df4fb5faba43..7bb87017d9db 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -2,6 +2,7 @@ #define __ASM_POWERPC_CPUTABLE_H +#include #include #include #include @@ -576,12 +577,10 @@ enum { }; #endif /* __powerpc64__ */ -static inline int cpu_has_feature(unsigned long feature) +static inline bool cpu_has_feature(unsigned long feature) { - return (CPU_FTRS_ALWAYS & feature) || - (CPU_FTRS_POSSIBLE - & cur_cpu_spec->cpu_features - & feature); + return !!((CPU_FTRS_ALWAYS & feature) || + (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature)); } #define HBP_NUM 1