Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5457
b: refs/heads/master
c: d6d2a2a
h: refs/heads/master
i:
  5455: ce2e2a6
v: v3
  • Loading branch information
Linus Torvalds committed Jul 29, 2005
1 parent 135f597 commit ff68887
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33ac02aa4cef417871e128ab4a6565e751e5f3b2
refs/heads/master: d6d2a2ab05da6e44bd127fe375078bb7c36a0ad0
13 changes: 6 additions & 7 deletions trunk/include/asm-i386/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,13 @@ static inline unsigned long __ffs(unsigned long word)
static inline int find_first_bit(const unsigned long *addr, unsigned size)
{
int x = 0;
do {
if (*addr)
return __ffs(*addr) + x;
addr++;
if (x >= size)
break;

while (x < size) {
unsigned long val = *addr++;
if (val)
return __ffs(val) + x;
x += (sizeof(*addr)<<3);
} while (1);
}
return x;
}

Expand Down

0 comments on commit ff68887

Please sign in to comment.