[PATCH] x86/platform/olpc: Remove redundant memset in prom_early_alloc()

Sang-Heon Jeon posted 1 patch 1 month ago
arch/x86/platform/olpc/olpc_dt.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] x86/platform/olpc: Remove redundant memset in prom_early_alloc()
Posted by Sang-Heon Jeon 1 month ago
memblock_alloc_or_panic() returns zeroed memory, so the memset after
the allocation is redundant.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 arch/x86/platform/olpc/olpc_dt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c
index e108ce7dad6a..b98f1fe70ce9 100644
--- a/arch/x86/platform/olpc/olpc_dt.c
+++ b/arch/x86/platform/olpc/olpc_dt.c
@@ -138,7 +138,6 @@ void * __init prom_early_alloc(unsigned long size)
 		 */
 		res = memblock_alloc_or_panic(chunk_size, SMP_CACHE_BYTES);
 		prom_early_allocated += chunk_size;
-		memset(res, 0, chunk_size);
 		free_mem = chunk_size;
 		mem = res;
 	}
-- 
2.43.0