Whamcloud - gitweb
- missed part of 16776 (fixes in __fls() for 64 bit case)
authoryury <yury>
Fri, 19 Sep 2008 21:20:36 +0000 (21:20 +0000)
committeryury <yury>
Fri, 19 Sep 2008 21:20:36 +0000 (21:20 +0000)
lnet/include/libcfs/user-bitops.h

index 3147f72..be248ab 100644 (file)
@@ -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)) {