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

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

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 7edb3cd6
...@@ -20,20 +20,22 @@ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size) ...@@ -20,20 +20,22 @@ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size)
if (!size) if (!size)
return 0; return 0;
/* This looks at memory. Mark it volatile to tell gcc not to move it around */ /* This looks at memory.
__asm__ __volatile__( * Mark it volatile to tell gcc not to move it around
"movl $-1,%%eax\n\t" */
"xorl %%edx,%%edx\n\t" asm volatile("movl $-1,%%eax\n\t"
"repe; scasl\n\t" "xorl %%edx,%%edx\n\t"
"je 1f\n\t" "repe; scasl\n\t"
"xorl -4(%%edi),%%eax\n\t" "je 1f\n\t"
"subl $4,%%edi\n\t" "xorl -4(%%edi),%%eax\n\t"
"bsfl %%eax,%%edx\n" "subl $4,%%edi\n\t"
"1:\tsubl %%ebx,%%edi\n\t" "bsfl %%eax,%%edx\n"
"shll $3,%%edi\n\t" "1:\tsubl %%ebx,%%edi\n\t"
"addl %%edi,%%edx" "shll $3,%%edi\n\t"
:"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) "addl %%edi,%%edx"
:"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); : "=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
: "1" ((size + 31) >> 5), "2" (addr),
"b" (addr) : "memory");
return res; return res;
} }
...@@ -75,7 +77,7 @@ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size) ...@@ -75,7 +77,7 @@ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
unsigned long val = *addr++; unsigned long val = *addr++;
if (val) if (val)
return __ffs(val) + x; return __ffs(val) + x;
x += (sizeof(*addr)<<3); x += sizeof(*addr) << 3;
} }
return x; return x;
} }
...@@ -152,10 +154,10 @@ static inline int fls(int x) ...@@ -152,10 +154,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.
先完成此消息的编辑!
想要评论请 注册