Skip to content

Commit

Permalink
m68k: define __fls
Browse files Browse the repository at this point in the history
Like fls, but can't be handed 0 and returns the bit number.

(I broke this arch in linux-next by using __fls in generic code).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Rusty Russell committed Dec 31, 2008
1 parent ccec25f commit 434ae51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/asm-m68k/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ static inline int fls(int x)
return 32 - cnt;
}

static inline int __fls(int x)
{
return fls(x) - 1;
}

#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/hweight.h>
Expand Down

0 comments on commit 434ae51

Please sign in to comment.