author: Mike Rapoport <rppt@linux.ibm.com> 2021-09-02 14:58:05 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:15 -0700
commit: 08678804e0b305bbbf5b756ad365373e5fe885a2
parent: c803b3c8b3b70f306ee6300bf8acdd70ffd1441a
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 14 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index de7b553baa50..a69449bffc8d 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1491,18 +1491,12 @@ void * __init memblock_alloc_exact_nid_raw(
phys_addr_t min_addr, phys_addr_t max_addr,
int nid)
{
- void *ptr;
-
memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pS\n",
__func__, (u64)size, (u64)align, nid, &min_addr,
&max_addr, (void *)_RET_IP_);
- ptr = memblock_alloc_internal(size, align,
- min_addr, max_addr, nid, true);
- if (ptr && size > 0)
- page_init_poison(ptr, size);
-
- return ptr;
+ return memblock_alloc_internal(size, align, min_addr, max_addr, nid,
+ true);
}
/**
@@ -1529,18 +1523,12 @@ void * __init memblock_alloc_try_nid_raw(
phys_addr_t min_addr, phys_addr_t max_addr,
int nid)
{
- void *ptr;
-
memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pS\n",
__func__, (u64)size, (u64)align, nid, &min_addr,
&max_addr, (void *)_RET_IP_);
- ptr = memblock_alloc_internal(size, align,
- min_addr, max_addr, nid, false);
- if (ptr && size > 0)
- page_init_poison(ptr, size);
-
- return ptr;
+ return memblock_alloc_internal(size, align, min_addr, max_addr, nid,
+ false);
}
/**