mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
of/fdt: remove redundant memset in __unflatten_device_tree()
Now that memblock and slab allocators are the only allocators and both return zero-initialized memory, zeroing the memory ourselves is redundant. The allocators used are: - kernel_tree_alloc uses kzalloc() - early_init_dt_alloc_memory_arch() and dt_alloc_memory() both use memblock_alloc() Remove redundant memset after the allocation. No funtional change. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Link: https://patch.msgid.link/20260418140420.2221736-1-ekffu200098@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
parent
6fcb912d5a
commit
63353810c0
|
|
@ -391,8 +391,6 @@ void *__unflatten_device_tree(const void *blob,
|
|||
if (!mem)
|
||||
return NULL;
|
||||
|
||||
memset(mem, 0, size);
|
||||
|
||||
*(__be32 *)(mem + size) = cpu_to_be32(0xdeadbeef);
|
||||
|
||||
pr_debug(" unflattening %p...\n", mem);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user