Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/crash: remove redundant 0 value initialization

The crash_mem struct is already zeroed by vzalloc(). It's redundant to
initialize cmem->nr_ranges to 0.

Link: https://lkml.kernel.org/r/20250818123530.635234-1-liaoyuanhong@vivo.com
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Betkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Coiby Xu <coxu@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Liao Yuanhong and committed by
Andrew Morton
6c609f36 228bf041

-2
-2
arch/x86/kernel/crash.c
··· 172 172 return NULL; 173 173 174 174 cmem->max_nr_ranges = nr_ranges; 175 - cmem->nr_ranges = 0; 176 175 177 176 return cmem; 178 177 } ··· 331 332 return -ENOMEM; 332 333 333 334 cmem->max_nr_ranges = nr_ranges; 334 - cmem->nr_ranges = 0; 335 335 336 336 memset(&cmd, 0, sizeof(struct crash_memmap_data)); 337 337 cmd.params = params;