summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-27 21:19:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-27 21:19:27 -0700
commit050026feae5bd4fe2db4096b63b15abce7c47faa (patch)
tree6d826f7548e16c949b51f257f7c5d4d85318e602 /arch
parent252a52aa4fa22a668f019e55b3aac3ff71ec1c29 (diff)
parentc9e2fbd909c20b165b2b9ffb59f8b674cf0a55b0 (diff)
downloadop-kernel-dev-050026feae5bd4fe2db4096b63b15abce7c47faa.zip
op-kernel-dev-050026feae5bd4fe2db4096b63b15abce7c47faa.tar.gz
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.h2
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)
OpenPOWER on IntegriCloud