diff options
author | Pavel Machek <pavel@ucw.cz> | 2008-04-28 05:13:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:26 -0400 |
commit | 2309f9e6fe3f1de661eab9613f7903ab4420c753 (patch) | |
tree | 283c26f2cd9f42bd63e7b514278aafe7c53a4dc0 /mm | |
parent | 97d87c9710bc6c5f2585fb9dc58f5bedbe996f10 (diff) |
mm/page_alloc.c: remove hand-coded get_order()
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d3358efdf4e..d1cf4f05dcd 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4345,9 +4345,7 @@ void *__init alloc_large_system_hash(const char *tablename, | |||
4345 | else if (hashdist) | 4345 | else if (hashdist) |
4346 | table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); | 4346 | table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); |
4347 | else { | 4347 | else { |
4348 | unsigned long order; | 4348 | unsigned long order = get_order(size); |
4349 | for (order = 0; ((1UL << order) << PAGE_SHIFT) < size; order++) | ||
4350 | ; | ||
4351 | table = (void*) __get_free_pages(GFP_ATOMIC, order); | 4349 | table = (void*) __get_free_pages(GFP_ATOMIC, order); |
4352 | /* | 4350 | /* |
4353 | * If bucketsize is not a power-of-two, we may free | 4351 | * If bucketsize is not a power-of-two, we may free |