Skip to content

Commit

Permalink
ia64: boolean __test_and_clear_bit
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Johannes Weiner authored and Fenghua Yu committed Aug 11, 2009
1 parent 51b89f7 commit 8d6f9af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d6f9af

Please sign in to comment.