kexec,x86: Use macro CRASH_MAX_MEMMAP_NR for clarification
Subsystems (2)
For the allocation, using CRASH_MAX_MEMMAP_NR instead of KEXEC_MAX_SEGMENTS + 1 seems more understandable.
Signed-off-by Zhang Yanfei <[email protected]>
--- kexec/arch/i386/crashdump-x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kexec/arch/i386/crashdump-x86.c +1 -1
@@ -975,7 +975,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,return -1 ;/* Memory regions which panic kernel can safely use to boot into */ - sz = (sizeof (struct memory_range ) * (KEXEC_MAX_SEGMENTS +1 )); + sz = (sizeof (struct memory_range ) *CRASH_MAX_MEMMAP_NR ); memmap_p =xmalloc (sz);memset (memmap_p,0 , sz);add_memmap (memmap_p, info->backup_src_start, info->backup_src_size);
Signature · 7 lines
1.7.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 2 lines · Zhang Yanfei
For the allocation, using
CRASH_MAX_MEMMAP_NRinstead ofKEXEC_MAX_SEGMENTS+ 1 seems more understandable.
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec