Commit 53b76073 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Thomas Gleixner
Browse files

x86/kexec: Make variable static and config dependent

The following sparse warning is emitted:

  warning: symbol 'crash_zero_bytes' was not declared. Should it be static?

The variable is only used in this compilation unit, but it is also only
used when CONFIG_KEXEC_FILE is enabled. Just making it static would result
in a 'defined but not used' warning for CONFIG_KEXEC_FILE=n.

Make it static and move it into the existing CONFIG_KEXEC_FILE section.

[ tglx: Massaged changelog and moved it into the existing ifdef ]

Fixes: dd5f7260

 ("kexec: support for kexec on panic using new system call")
Signed-off-by: default avatarTiezhu Yang <>
Signed-off-by: default avatarThomas Gleixner <>
Acked-by: default avatarDave Young <>
Cc: Vivek Goyal <>
parent 166da5c5
......@@ -56,7 +56,6 @@ struct crash_memmap_data {
crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL;
unsigned long crash_zero_bytes;
static inline void cpu_crash_vmclear_loaded_vmcss(void)
......@@ -181,6 +180,9 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
static unsigned long crash_zero_bytes;
static int get_nr_ram_ranges_callback(struct resource *res, void *arg)
unsigned int *nr_ranges = arg;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment