From 0291dcfba7d59c62653040ce3f19ca73fa7cebe3 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 13 May 2003 19:12:08 +0100 Subject: [ARM] Fix test_bit to return 0 or 1. --- include/asm-arm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index 2e962ac85c7f..917adde845ba 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h @@ -173,7 +173,7 @@ static inline int __test_and_change_bit(int nr, volatile unsigned long *p) */ static inline int __test_bit(int nr, const unsigned long * p) { - return p[nr >> 5] & (1UL << (nr & 31)); + return (p[nr >> 5] >> (nr & 31)) & 1UL; } /* -- cgit v1.2.3