diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-02-13 12:35:17 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-15 11:07:01 +0100 |
commit | b977f03ec44aef7f6728bfe1a48f3ee5b0776001 (patch) | |
tree | f112ecbcaa209ae648adc1bd7f80d75d5856bbbb /arch/s390/include/asm/processor.h | |
parent | d9c2cf67b9cfd643ba85d51bc865a89a92e4f979 (diff) |
s390/processor: let cpu helper functions return boolean values
Let cpu helper functions return boolean values. This also allows to
make the code a bit simpler by getting rid of the "!!" construct.
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r-- | arch/s390/include/asm/processor.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 53172b27a3eb..9f89d3821d16 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -54,19 +54,20 @@ static __always_inline void clear_cpu_flag(int flag) S390_lowcore.cpu_flags &= ~(1UL << flag); } -static __always_inline int test_cpu_flag(int flag) +static __always_inline bool test_cpu_flag(int flag) { - return !!(S390_lowcore.cpu_flags & (1UL << flag)); + return S390_lowcore.cpu_flags & (1UL << flag); } /* * Test CIF flag of another CPU. The caller needs to ensure that * CPU hotplug can not happen, e.g. by disabling preemption. */ -static __always_inline int test_cpu_flag_of(int flag, int cpu) +static __always_inline bool test_cpu_flag_of(int flag, int cpu) { struct lowcore *lc = lowcore_ptr[cpu]; - return !!(lc->cpu_flags & (1UL << flag)); + + return lc->cpu_flags & (1UL << flag); } #define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY) |