Skip to content

Commit

Permalink
mm/page_alloc.c: deduplicate __memblock_free_early() and memblock_free()
Browse files Browse the repository at this point in the history
Link: http://lkml.kernel.org/r/C8ECE1B7A767434691FEEFA3A01765D72AFB8E78@MX203CL03.corp.emc.com
Signed-off-by: Wentao Wang <witallwang@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wentao Wang authored and Linus Torvalds committed Dec 28, 2018
1 parent 742aa7f commit d31cfe7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,12 +1546,7 @@ void * __init memblock_alloc_try_nid(
*/
void __init __memblock_free_early(phys_addr_t base, phys_addr_t size)
{
phys_addr_t end = base + size - 1;

memblock_dbg("%s: [%pa-%pa] %pF\n",
__func__, &base, &end, (void *)_RET_IP_);
kmemleak_free_part_phys(base, size);
memblock_remove_range(&memblock.reserved, base, size);
memblock_free(base, size);
}

/**
Expand Down

0 comments on commit d31cfe7

Please sign in to comment.