Skip to contentSkip to conversation

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

PATCH New Sang-Heon Jeon 1 participant 1 message Aug 27 x86

lore
Share & tools
lore
#0 lore raw

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

memblock_alloc_or_panic() returns zeroed memory, so the memset after the allocation is redundant.

No functional change.

---
 arch/x86/platform/olpc/olpc_dt.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/platform/olpc/olpc_dt.c +0 -1
index e108ce7dad6a..b98f1fe70ce9 100644
@@ -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;
 	}
Signature · 1 line
2.43.0