Commit 91f47662dfaa5b459aebe13284c6c38db27350dc

Authored by Cyrill Gorcunov
Committed by Linus Torvalds
1 parent 73ce02e96f

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>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

... ... @@ -1005,7 +1005,7 @@
1005 1005 return page;
1006 1006 }
1007 1007  
1008   -__attribute__((weak)) int alloc_bootmem_huge_page(struct hstate *h)
  1008 +int __weak alloc_bootmem_huge_page(struct hstate *h)
1009 1009 {
1010 1010 struct huge_bootmem_page *m;
1011 1011 int nr_nodes = nodes_weight(node_online_map);
... ... @@ -1024,8 +1024,7 @@
1024 1024 * puts them into the mem_map).
1025 1025 */
1026 1026 m = addr;
1027   - if (m)
1028   - goto found;
  1027 + goto found;
1029 1028 }
1030 1029 hstate_next_node(h);
1031 1030 nr_nodes--;