From: Blue Swirl <blauwir...@gmail.com> Use 'bool' type for return value of bit test functions.
Signed-off-by: Blue Swirl <blauwir...@gmail.com> --- bitops.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitops.h b/bitops.h index bc99727..1cecf00 100644 --- a/bitops.h +++ b/bitops.h @@ -153,7 +153,7 @@ static inline void change_bit(unsigned int nr, unsigned long *addr) * @nr: Bit to set * @addr: Address to count from */ -static inline int test_and_set_bit(unsigned int nr, unsigned long *addr) +static inline bool test_and_set_bit(unsigned int nr, unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -168,7 +168,7 @@ static inline int test_and_set_bit(unsigned int nr, unsigned long *addr) * @nr: Bit to clear * @addr: Address to count from */ -static inline int test_and_clear_bit(unsigned int nr, unsigned long *addr) +static inline bool test_and_clear_bit(unsigned int nr, unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -183,7 +183,7 @@ static inline int test_and_clear_bit(unsigned int nr, unsigned long *addr) * @nr: Bit to change * @addr: Address to count from */ -static inline int test_and_change_bit(unsigned int nr, unsigned long *addr) +static inline bool test_and_change_bit(unsigned int nr, unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); @@ -198,7 +198,7 @@ static inline int test_and_change_bit(unsigned int nr, unsigned long *addr) * @nr: bit number to test * @addr: Address to start counting from */ -static inline int test_bit(unsigned int nr, const unsigned long *addr) +static inline bool test_bit(unsigned int nr, const unsigned long *addr) { return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); } -- 1.7.2.5