Explorar o código

ia64: boolean __test_and_clear_bit

__test_and_clear_bit() returns a bitfield with the tested-for bit set.
Make it consistent with the other bitops - of ia64 but also every
other architecture - and return a boolean value.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
Johannes Weiner %!s(int64=16) %!d(string=hai) anos
pai
achega
8d6f9af919
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/ia64/include/asm/bitops.h

+ 1 - 1
arch/ia64/include/asm/bitops.h

@@ -286,7 +286,7 @@ __test_and_clear_bit(int nr, volatile void * addr)
 {
 	__u32 *p = (__u32 *) addr + (nr >> 5);
 	__u32 m = 1 << (nr & 31);
-	int oldbitset = *p & m;
+	int oldbitset = (*p & m) != 0;
 
 	*p &= ~m;
 	return oldbitset;