diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-27 21:19:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-27 21:19:27 -0700 |
commit | 050026feae5bd4fe2db4096b63b15abce7c47faa (patch) | |
tree | 6d826f7548e16c949b51f257f7c5d4d85318e602 /arch | |
parent | 252a52aa4fa22a668f019e55b3aac3ff71ec1c29 (diff) | |
parent | c9e2fbd909c20b165b2b9ffb59f8b674cf0a55b0 (diff) |
Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/bitops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 545776efeb16..bafd80defa43 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -309,7 +309,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr) { return ((1UL << (nr % BITS_PER_LONG)) & - (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0; + (addr[nr / BITS_PER_LONG])) != 0; } static inline int variable_test_bit(int nr, volatile const unsigned long *addr) |