MN10300: Don't cast away the volatile in test_bit()
authorAkira Takeuchi <takeuchi.akr@jp.panasonic.com>
Wed, 27 Oct 2010 16:28:36 +0000 (17:28 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 27 Oct 2010 16:28:36 +0000 (17:28 +0100)
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: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
arch/mn10300/include/asm/bitops.h

index 6208ea6..3b8a868 100644 (file)
@@ -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));
 }
 
 /*