From: Akira Takeuchi Date: Wed, 27 Oct 2010 16:28:36 +0000 (+0100) Subject: MN10300: Don't cast away the volatile in test_bit() X-Git-Tag: upstream/snapshot3+hdmi~12623^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3195d0b564c4aa3f8ff13b536e3c09a9ffed8f12;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Akira Takeuchi Signed-off-by: Kiyoshi Owada Signed-off-by: David Howells --- diff --git a/arch/mn10300/include/asm/bitops.h b/arch/mn10300/include/asm/bitops.h index 6208ea6..3b8a868 100644 --- a/arch/mn10300/include/asm/bitops.h +++ b/arch/mn10300/include/asm/bitops.h @@ -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)); } /*