From 574409f35c83b4f335c107f2d845ca6f9507f3de Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 19 Sep 2008 21:20:36 +0000 Subject: [PATCH] - missed part of 16776 (fixes in __fls() for 64 bit case) --- lnet/include/libcfs/user-bitops.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lnet/include/libcfs/user-bitops.h b/lnet/include/libcfs/user-bitops.h index 3147f72..be248ab 100644 --- a/lnet/include/libcfs/user-bitops.h +++ b/lnet/include/libcfs/user-bitops.h @@ -82,8 +82,12 @@ static __inline__ unsigned long __fls(long data) return 0; #if BITS_PER_LONG == 64 - if ((data & 0xFFFFFFFF) == 0) + pos += 32; + + if ((data & 0xFFFFFFFF) == 0) { data <<= 32; + pos -= 32; + } #endif if (!(data & 0xFFFF0000u)) { -- 1.8.3.1