提交 8d6f9af9 编写于 作者: J Johannes Weiner 提交者: Fenghua Yu

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: NJohannes Weiner <hannes@cmpxchg.org>
Acked-by: NFenghua Yu <fenghua.yu@intel.com>
上级 51b89f7a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册