[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250825123307.306634-1-liaoyuanhong@vivo.com>
Date: Mon, 25 Aug 2025 20:33:05 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Petr Mladek <pmladek@...e.com>,
Mario Limonciello <mario.limonciello@....com>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Joel Granados <joel.granados@...nel.org>,
Steven Chen <chenste@...ux.microsoft.com>,
Alexander Graf <graf@...zon.com>,
Yan Zhao <yan.y.zhao@...el.com>,
kexec@...ts.infradead.org (open list:KEXEC),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] kexec_core: Remove redundant 0 value initialization
The kimage struct is already zeroed by kzalloc(). It's redundant to
initialize image->head to 0.
Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
kernel/kexec_core.c | 1 -
1 file changed, 1 deletion(-)
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 */
--
2.34.1
Powered by blists - more mailing lists