From 52d61227b66d4099b39c8309ab37cb67ee09a405 Mon Sep 17 00:00:00 2001 From: Simon Kagstrom Date: Mon, 24 Aug 2009 09:10:12 +0200 Subject: Define ffs/fls for all architectures UBIFS requires fls(), which is not defined for arm (and some other architectures) and this patch adds it. The implementation is taken from Linux and is generic. ffs() is also defined for those that miss it. Signed-off-by: Simon Kagstrom --- include/asm-i386/bitops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/asm-i386') diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index b768e20fb..ac6285aa5 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h @@ -349,6 +349,7 @@ static __inline__ int ffs(int x) "1:" : "=r" (r) : "g" (x)); return r+1; } +#define ffs /** * hweightN - returns the hamming weight of a N-bit word -- cgit v1.2.3