提交 04483e15 编写于 作者: C Corentin Chary 提交者: Blue Swirl

bitops: fix test_and_change_bit()

./bitops.h:192: warning: ‘old’ is used uninitialized in this function
Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 89d2d3af
......@@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
unsigned long old;
unsigned long old = *p;
*p = old ^ mask;
return (old & mask) != 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册