Messages in this thread Patch in this message | | | Date | Mon, 27 Sep 2010 21:00:43 -0700 | From | "H. Peter Anvin" <> | Subject | [GIT PULL] x86: constant_test_bit() fix |
| |
Hi Linus,
The following changes since commit 252a52aa4fa22a668f019e55b3aac3ff71ec1c29:
Fix pktcdvd ioctl dev_minor range check (2010-09-27 16:29:06 -0700)
are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86/urgent
Alexander Chumachenko (1): x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile
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 545776e..bafd80d 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)
| |