From: Jens Axboe Date: Mon, 2 Jun 2008 07:59:32 +0000 (+0200) Subject: smalloc: use optimized ffz() X-Git-Tag: fio-1.21-rc4~3 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b3268b928ec7596a1d294a46a2771c3da789e7d3;ds=sidebyside smalloc: use optimized ffz() Signed-off-by: Jens Axboe --- diff --git a/smalloc.c b/smalloc.c index 6cbf59cf..0a86c43b 100644 --- a/smalloc.c +++ b/smalloc.c @@ -12,7 +12,7 @@ #include #include "mutex.h" -#include "lib/ffz.h" +#include "arch/arch.h" #define MP_SAFE /* define to make thread safe */ #define SMALLOC_REDZONE /* define to detect memory corruption */ @@ -178,7 +178,7 @@ static int find_next_zero(int word, int start) { assert(word != -1U); word >>= (start + 1); - return __ffs(~word) + start + 1; + return ffz(word) + start + 1; } static int add_pool(struct pool *pool, unsigned int alloc_size)