Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 050026fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents 252a52aa c9e2fbd9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)