]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/bootconfig: drop redundant memset of xbc_nodes
authorJosh Law <objecting@objecting.org>
Wed, 18 Mar 2026 15:59:11 +0000 (15:59 +0000)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 18 Mar 2026 23:43:43 +0000 (08:43 +0900)
commit73a9f74b86c6b88d1b6aec82adea56074ef2a9b9
treeeae98e0814bf0296af2b3ba72e7a61ed9711deac
parentae9bf4d3835fb1cd3f79ea74e96e6ab6cfe8f415
lib/bootconfig: drop redundant memset of xbc_nodes

memblock_alloc() already returns zeroed memory, so the explicit memset
in xbc_init() is redundant. Switch the userspace xbc_alloc_mem() from
malloc() to calloc() so both paths return zeroed memory, and remove
the separate memset call.

Link: https://lore.kernel.org/all/20260318155919.78168-6-objecting@objecting.org/
Signed-off-by: Josh Law <objecting@objecting.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
lib/bootconfig.c