patch-2.4.25 linux-2.4.25/include/asm-mips/bitops.h

Next file: linux-2.4.25/include/asm-mips/bootinfo.h
Previous file: linux-2.4.25/include/asm-mips/au1000.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/include/asm-mips/bitops.h linux-2.4.25/include/asm-mips/bitops.h
@@ -658,6 +658,8 @@
 
 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)