lkml.org 
[lkml]   [2000]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.152 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site