[patch] include/asm/page.h (one less loop) (2.4.0-test6-pre9)

From: Justin (jguyett@andrew.cmu.edu)
Date: Wed Aug 09 2000 - 15:43:20 EST


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/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:19 EST