Skip to content

Commit 44fd81f

Browse files
mitaaegl
authored andcommitted
[IA64] Use asm-generic/bitops/builtin-ffs.h
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>
1 parent ab10596 commit 44fd81f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎arch/ia64/include/asm/bitops.h‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,7 @@ __fls (unsigned long x)
425425

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

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

436430
/*
437431
* hweightN: returns the hamming weight (i.e. the number

0 commit comments

Comments
 (0)