diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-07-04 09:28:14 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2018-07-29 11:48:18 +0300 |
commit | 384052e4ed274747fb96deb2df46a14d023a2986 (patch) | |
tree | e8a81fced18f743c05b4d1e904df3dc4417265b0 /arch/m68k/include | |
parent | 781c4d6f5f278fc23687d6d224ddb452bb5ac368 (diff) | |
download | linux-384052e4ed274747fb96deb2df46a14d023a2986.tar.xz |
m68k/bitops: convert __ffs to match generic declaration
The generic bitops declare __ffs as
static inline unsigned long __ffs(unsigned long word);
Convert the m68k version to match the generic declaration.
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/bitops.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index 93b47b1f6fb4..54009ea710b3 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -454,7 +454,7 @@ static inline unsigned long ffz(unsigned long word) */ #if (defined(__mcfisaaplus__) || defined(__mcfisac__)) && \ !defined(CONFIG_M68000) && !defined(CONFIG_MCPU32) -static inline int __ffs(int x) +static inline unsigned long __ffs(unsigned long x) { __asm__ __volatile__ ("bitrev %0; ff1 %0" : "=d" (x) @@ -493,7 +493,11 @@ static inline int ffs(int x) : "dm" (x & -x)); return 32 - cnt; } -#define __ffs(x) (ffs(x) - 1) + +static inline unsigned long __ffs(unsigned long x) +{ + return ffs(x) - 1; +} /* * fls: find last bit set. |