mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-19 11:23:11 +00:00
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 <mpe@ellerman.id.au>
This commit is contained in:
parent
a81dc9d995
commit
6574ba950b
@ -2,6 +2,7 @@
|
|||||||
#define __ASM_POWERPC_CPUTABLE_H
|
#define __ASM_POWERPC_CPUTABLE_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <linux/types.h>
|
||||||
#include <asm/asm-compat.h>
|
#include <asm/asm-compat.h>
|
||||||
#include <asm/feature-fixups.h>
|
#include <asm/feature-fixups.h>
|
||||||
#include <uapi/asm/cputable.h>
|
#include <uapi/asm/cputable.h>
|
||||||
@ -576,12 +577,10 @@ enum {
|
|||||||
};
|
};
|
||||||
#endif /* __powerpc64__ */
|
#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) ||
|
return !!((CPU_FTRS_ALWAYS & feature) ||
|
||||||
(CPU_FTRS_POSSIBLE
|
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
|
||||||
& cur_cpu_spec->cpu_features
|
|
||||||
& feature);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HBP_NUM 1
|
#define HBP_NUM 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user