summaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-01-06 14:40:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:10 -0800
commit91f47662dfaa5b459aebe13284c6c38db27350dc (patch)
treef2ab72a8be3219b1233e9c63e87f235219df3053 /mm/hugetlb.c
parent73ce02e96fe34a983199a9855b2ae738f960a6ee (diff)
downloadlinux-3.10-91f47662dfaa5b459aebe13284c6c38db27350dc.tar.gz
linux-3.10-91f47662dfaa5b459aebe13284c6c38db27350dc.tar.bz2
linux-3.10-91f47662dfaa5b459aebe13284c6c38db27350dc.zip
mm: hugetlb: remove redundant `if' operation
At this point we already know that 'addr' is not NULL so get rid of redundant 'if'. Probably gcc eliminate it by optimization pass. [akpm@linux-foundation.org: use __weak, too] Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 82321da23cc..618e9830408 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1005,7 +1005,7 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,
return page;
}
-__attribute__((weak)) int alloc_bootmem_huge_page(struct hstate *h)
+int __weak alloc_bootmem_huge_page(struct hstate *h)
{
struct huge_bootmem_page *m;
int nr_nodes = nodes_weight(node_online_map);
@@ -1024,8 +1024,7 @@ __attribute__((weak)) int alloc_bootmem_huge_page(struct hstate *h)
* puts them into the mem_map).
*/
m = addr;
- if (m)
- goto found;
+ goto found;
}
hstate_next_node(h);
nr_nodes--;