Messages in this thread Patch in this message | | | Date | Wed, 9 Aug 2000 16:43:20 -0400 (EDT) | From | Justin <> | Subject | [patch] include/asm/page.h (one less loop) (2.4.0-test6-pre9) |
| |
given sufficient fuzz this should work for any asm-*/page.h
justin
--- linux/include/asm-i386/page.h.orig Wed Aug 9 06:16:34 2000 +++ linux/include/asm-i386/page.h Wed Aug 9 06:23:03 2000 @@ -102,12 +102,12 @@ { int order; - size = (size-1) >> (PAGE_SHIFT-1); - order = -1; - do { + size = (size-1) >> (PAGE_SHIFT); + order = 0 + while (size) { size >>= 1; order++; - } while (size); + } return order; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |