提交 3195d0b5 编写于 作者: A Akira Takeuchi 提交者: David Howells

MN10300: Don't cast away the volatile in test_bit()

Don't cast away the volatile in test_bit()'s parameter when we change its type
from const volatile void * so that we can dereference it.
Signed-off-by: NAkira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: NKiyoshi Owada <owada.kiyoshi@jp.panasonic.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 3a5f65df
......@@ -72,7 +72,7 @@ static inline void __clear_bit(unsigned long nr, volatile void *addr)
*/
static inline int test_bit(unsigned long nr, const volatile void *addr)
{
return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
return 1UL & (((const volatile unsigned int *) addr)[nr >> 5] >> (nr & 31));
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册