]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mm/page_alloc.c: remove hand-coded get_order()
authorPavel Machek <pavel@ucw.cz>
Mon, 28 Apr 2008 09:13:35 +0000 (02:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:26 +0000 (08:58 -0700)
Remove hand-coded get_order() from page_alloc.c.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c

index d3358efdf4e634c50be79e6ed8311ff76e2fe224..d1cf4f05dcdaff12c4e261495efe53a3b3dd7209 100644 (file)
@@ -4345,9 +4345,7 @@ void *__init alloc_large_system_hash(const char *tablename,
                else if (hashdist)
                        table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
                else {
-                       unsigned long order;
-                       for (order = 0; ((1UL << order) << PAGE_SHIFT) < size; order++)
-                               ;
+                       unsigned long order = get_order(size);
                        table = (void*) __get_free_pages(GFP_ATOMIC, order);
                        /*
                         * If bucketsize is not a power-of-two, we may free