提交 49f74946 编写于 作者: J Joe Perches 提交者: Ingo Molnar

include/asm-x86/bitops_64.h: checkpatch cleanups - formatting only

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 fd591acd
...@@ -17,35 +17,35 @@ static inline long __scanbit(unsigned long val, unsigned long max) ...@@ -17,35 +17,35 @@ static inline long __scanbit(unsigned long val, unsigned long max)
return val; return val;
} }
#define find_first_bit(addr,size) \
((__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) \ #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)))) : \ ((off) + (__scanbit((*(unsigned long *)addr) >> (off),(size)-(off)))) : \
find_next_bit(addr,size,off))) find_next_bit(addr,size,off)))
#define find_first_zero_bit(addr,size) \
((__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) \ #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)))) : \ ((off)+(__scanbit(~(((*(unsigned long *)addr)) >> (off)),(size)-(off)))) : \
find_next_zero_bit(addr,size,off))) find_next_zero_bit(addr,size,off)))
static inline void set_bit_string(unsigned long *bitmap, unsigned long i, #define find_first_bit(addr, size) \
int len) ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \
{ ? (__scanbit(*(unsigned long *)(addr), (size))) \
unsigned long end = i + len; : find_first_bit((addr), (size))))
#define find_first_zero_bit(addr, size) \
((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \
? (__scanbit(~*(unsigned long *)(addr), (size))) \
: find_first_zero_bit((addr), (size))))
static inline void set_bit_string(unsigned long *bitmap, unsigned long i,
int len)
{
unsigned long end = i + len;
while (i < end) { while (i < end) {
__set_bit(i, bitmap); __set_bit(i, bitmap);
i++; i++;
} }
} }
/** /**
* ffz - find first zero in word. * ffz - find first zero in word.
...@@ -150,10 +150,10 @@ static inline int fls(int x) ...@@ -150,10 +150,10 @@ static inline int fls(int x)
#include <asm-generic/bitops/ext2-non-atomic.h> #include <asm-generic/bitops/ext2-non-atomic.h>
#define ext2_set_bit_atomic(lock,nr,addr) \ #define ext2_set_bit_atomic(lock, nr, addr) \
test_and_set_bit((nr),(unsigned long*)addr) test_and_set_bit((nr), (unsigned long *)(addr))
#define ext2_clear_bit_atomic(lock,nr,addr) \ #define ext2_clear_bit_atomic(lock, nr, addr) \
test_and_clear_bit((nr),(unsigned long*)addr) test_and_clear_bit((nr), (unsigned long *)(addr))
#include <asm-generic/bitops/minix.h> #include <asm-generic/bitops/minix.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册