diff options
author | Andi Kleen <ak@suse.de> | 2005-01-14 23:23:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:23:16 -0800 |
commit | e4550363c8e573b274266bc4e5854381b0fc1abb (patch) | |
tree | a16804f6bd79f0a1262e728195a5a2a03dc04c6d /include | |
parent | 48c6c59c537a35a902736e3db3d3931a64c74a11 (diff) | |
download | history-e4550363c8e573b274266bc4e5854381b0fc1abb.tar.gz |
[PATCH] x86_64: Add brackets to bitops
Add missing argument brackets in bitop macros
Makes these macros somewhat safer to use.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/bitops.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index c44e168f13d194..5dd7727c756b49 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h @@ -267,22 +267,22 @@ static inline unsigned long __scanbit(unsigned long val, unsigned long max) } #define find_first_bit(addr,size) \ -((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ +((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \ (__scanbit(*(unsigned long *)addr,(size))) : \ find_first_bit(addr,size))) #define find_next_bit(addr,size,off) \ -((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ +((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \ ((off) + (__scanbit((*(unsigned long *)addr) >> (off),(size)-(off)))) : \ find_next_bit(addr,size,off))) #define find_first_zero_bit(addr,size) \ -((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ +((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \ (__scanbit(~*(unsigned long *)addr,(size))) : \ find_first_zero_bit(addr,size))) #define find_next_zero_bit(addr,size,off) \ -((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ +((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \ ((off)+(__scanbit(~(((*(unsigned long *)addr)) >> (off)),(size)-(off)))) : \ find_next_zero_bit(addr,size,off))) |