patch-2.4.0-test7 linux/include/asm-sparc64/bitops.h
Next file: linux/include/asm-sparc64/fcntl.h
Previous file: linux/include/asm-sparc/unistd.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Sat Aug 12 12:08:50 2000
- Orig file:
v2.4.0-test6/linux/include/asm-sparc64/bitops.h
- Orig date:
Mon Jul 10 16:47:27 2000
diff -u --recursive --new-file v2.4.0-test6/linux/include/asm-sparc64/bitops.h linux/include/asm-sparc64/bitops.h
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.29 2000/06/30 10:18:39 davem Exp $
+/* $Id: bitops.h,v 1.30 2000/08/10 23:49:16 davem Exp $
* bitops.h: Bit string operations on the V9.
*
* Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -158,6 +158,8 @@
found_first:
tmp |= ~0UL << size;
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. */
found_middle:
return result + ffz(tmp);
}
@@ -217,6 +219,8 @@
tmp = __swab64p(p);
found_first:
tmp |= (~0UL << size);
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. */
found_middle:
return result + ffz(tmp);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)