Bit testing (test, testset, testclear, testchange) for bit numbers
known at compile time returns a word with the tested-for bit set.
Change it to return a true boolean value so to make it consistent with
the out-of-line path and all the other bitops implementations.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
*p = res | mask;
raw_local_irq_restore(flags);
- return res & mask;
+ return (res & mask) != 0;
}
static inline int
*p = res & ~mask;
raw_local_irq_restore(flags);
- return res & mask;
+ return (res & mask) != 0;
}
static inline int
*p = res ^ mask;
raw_local_irq_restore(flags);
- return res & mask;
+ return (res & mask) != 0;
}
#include <asm-generic/bitops/non-atomic.h>