Skip to content

Commit

Permalink
[IA64] Use asm-generic/bitops/builtin-ffs.h
Browse files Browse the repository at this point in the history
The definition of ffs() for ia64 is almost the same as
asm-generic/bitops/builtin-ffs.h.  The only difference is whether it is
defined as inline function or macro function.  So this switches to use
the header (both to reduce amount of arch specific code, and because
inline functions provide type-checking that macros do not).

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Akinobu Mita authored and Tony Luck committed Aug 26, 2013
1 parent ab10596 commit 44fd81f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/ia64/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,7 @@ __fls (unsigned long x)

#include <asm-generic/bitops/fls64.h>

/*
* ffs: find first bit set. This is defined the same way as the libc and
* compiler builtin ffs routines, therefore differs in spirit from the above
* ffz (man ffs): it operates on "int" values only and the result value is the
* bit number + 1. ffs(0) is defined to return zero.
*/
#define ffs(x) __builtin_ffs(x)
#include <asm-generic/bitops/builtin-ffs.h>

/*
* hweightN: returns the hamming weight (i.e. the number
Expand Down

0 comments on commit 44fd81f

Please sign in to comment.