mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
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
This commit is contained in:
commit
050026feae
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
|
||||||
{
|
{
|
||||||
return ((1UL << (nr % BITS_PER_LONG)) &
|
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)
|
static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue