From: Johannes Weiner <[hannes@cmpxchg.org]> Date: Tue, 11 Aug 2009 21:52:10 +0000 (-0700) Subject: ia64: boolean __test_and_clear_bit X-Git-Tag: upstream/snapshot3+hdmi~17865^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d6f9af91959256244878cd801c1c969e66cd093;hp=51b89f7a6615eca184aa0b85db5781d931e9c8d1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Fenghua Yu --- diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h index e2ca800..57a2787 100644 --- a/arch/ia64/include/asm/bitops.h +++ b/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;