Skip to content

Commit

Permalink
MN10300: Don't cast away the volatile in test_bit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akira Takeuchi authored and David Howells committed Oct 27, 2010
1 parent 3a5f65d commit 3195d0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mn10300/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/*
Expand Down

0 comments on commit 3195d0b

Please sign in to comment.