projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73ce02e
)
mm: hugetlb: remove redundant `if' operation
author
Cyrill Gorcunov
<
[email protected]
>
Tue, 6 Jan 2009 22:40:33 +0000
(14:40 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 6 Jan 2009 23:59:10 +0000
(15:59 -0800)
At this point we already know that 'addr' is not NULL so get rid of
redundant 'if'. Probably gcc eliminate it by optimization pass.
[
[email protected]
: use __weak, too]
Signed-off-by: Cyrill Gorcunov <
[email protected]
>
Reviewed-by: Ingo Molnar <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/hugetlb.c
patch
|
blob
|
history
diff --git
a/mm/hugetlb.c
b/mm/hugetlb.c
index 82321da23cc36b64a66d1718567a87376461d556..618e98304080a8bdb3ace929c8dcb8938662fad4 100644
(file)
--- 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--;