patch-2.2.17 linux/include/asm-sparc64/bitops.h
Next file: linux/include/asm-sparc64/display7seg.h
Previous file: linux/include/asm-sparc/bitops.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Sep 4 18:39:28 2000
- Orig file:
v2.2.16/include/asm-sparc64/bitops.h
- Orig date:
Mon Sep 4 18:37:16 2000
diff -u --recursive --new-file v2.2.16/include/asm-sparc64/bitops.h linux/include/asm-sparc64/bitops.h
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.26 1999/01/07 14:14:15 jj Exp $
+/* $Id: bitops.h,v 1.26.2.1 2000/08/10 23:50:04 davem Exp $
* bitops.h: Bit string operations on the V9.
*
* Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -273,6 +273,8 @@
found_first:
tmp |= ~0UL << size;
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. */
found_middle:
return result + ffz(tmp);
}
@@ -369,6 +371,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)