Skip to content

Commit b977f03

Browse files
committed
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent d9c2cf6 commit b977f03

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/s390/include/asm/processor.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,20 @@ static __always_inline void clear_cpu_flag(int flag)
5454
S390_lowcore.cpu_flags &= ~(1UL << flag);
5555
}
5656

57-
static __always_inline int test_cpu_flag(int flag)
57+
static __always_inline bool test_cpu_flag(int flag)
5858
{
59-
return !!(S390_lowcore.cpu_flags & (1UL << flag));
59+
return S390_lowcore.cpu_flags & (1UL << flag);
6060
}
6161

6262
/*
6363
* Test CIF flag of another CPU. The caller needs to ensure that
6464
* CPU hotplug can not happen, e.g. by disabling preemption.
6565
*/
66-
static __always_inline int test_cpu_flag_of(int flag, int cpu)
66+
static __always_inline bool test_cpu_flag_of(int flag, int cpu)
6767
{
6868
struct lowcore *lc = lowcore_ptr[cpu];
69-
return !!(lc->cpu_flags & (1UL << flag));
69+
70+
return lc->cpu_flags & (1UL << flag);
7071
}
7172

7273
#define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY)

0 commit comments

Comments
 (0)