Commit 050026feae5bd4fe2db4096b63b15abce7c47faa
Exists in
master
and in
4 other branches
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
Showing 1 changed file Side-by-side Diff
arch/x86/include/asm/bitops.h
... | ... | @@ -309,7 +309,7 @@ |
309 | 309 | static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr) |
310 | 310 | { |
311 | 311 | return ((1UL << (nr % BITS_PER_LONG)) & |
312 | - (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0; | |
312 | + (addr[nr / BITS_PER_LONG])) != 0; | |
313 | 313 | } |
314 | 314 | |
315 | 315 | static inline int variable_test_bit(int nr, volatile const unsigned long *addr) |