From: Liao Yuanhong Date: Mon, 25 Aug 2025 12:33:05 +0000 (+0800) Subject: kexec_core: remove redundant 0 value initialization X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=13818f7b8c85c89aa97a430f8116490c1b833470;p=users%2Fhch%2Fmisc.git kexec_core: remove redundant 0 value initialization The kimage struct is already zeroed by kzalloc(). It's redundant to initialize image->head to 0. Link: https://lkml.kernel.org/r/20250825123307.306634-1-liaoyuanhong@vivo.com Signed-off-by: Liao Yuanhong Signed-off-by: Andrew Morton --- diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 31203f0bacaf..fa00b239c5d9 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -233,7 +233,6 @@ struct kimage *do_kimage_alloc_init(void) if (!image) return NULL; - image->head = 0; image->entry = &image->head; image->last_entry = &image->head; image->control_page = ~0; /* By default this does not apply */