aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bitops.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 12:49:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 12:49:50 -0800
commitc4295fbb6048d85f0b41c5ced5cbf63f6811c46c (patch)
tree948857a7a45bbe5cd4bd654d4523ddda26cd3144 /arch/x86/include/asm/bitops.h
parente245b80c8357bf375f15c5f3b05ef8ae35e4fbc8 (diff)
downloadkernel_samsung_smdk4412-c4295fbb6048d85f0b41c5ced5cbf63f6811c46c.zip
kernel_samsung_smdk4412-c4295fbb6048d85f0b41c5ced5cbf63f6811c46c.tar.gz
kernel_samsung_smdk4412-c4295fbb6048d85f0b41c5ced5cbf63f6811c46c.tar.bz2
x86: make 'constant_test_bit()' take an unsigned bit number
Ingo noticed that using signed arithmetic seems to confuse the gcc inliner, and make it potentially decide that it's all too complicated. (Yeah, yeah, it's a constant. It's always positive. Still..) Based-on: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/bitops.h')
-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 9fa9dcd..e02a359 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -300,7 +300,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
return oldbit;
}
-static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
+static 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;