From: Andrew Morton x86_64 allnoconfig: arch/x86/kernel/setup.c:736: warning: 'dmi_low_memory_corruption' defined but not used Cc: Ingo Molnar Signed-off-by: Andrew Morton --- arch/x86/kernel/setup.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff -puN arch/x86/kernel/setup.c~arch-x86-kernel-setupc-omit-dmi_low_memory_corruption-when-it-is-unneeded arch/x86/kernel/setup.c --- a/arch/x86/kernel/setup.c~arch-x86-kernel-setupc-omit-dmi_low_memory_corruption-when-it-is-unneeded +++ a/arch/x86/kernel/setup.c @@ -732,6 +732,7 @@ void start_periodic_check_for_corruption } #endif +#ifdef CONFIG_X86_RESERVE_LOW_64K static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) { printk(KERN_NOTICE @@ -746,7 +747,6 @@ static int __init dmi_low_memory_corrupt /* List of systems that have known low memory corruption BIOS problems */ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { -#ifdef CONFIG_X86_RESERVE_LOW_64K { .callback = dmi_low_memory_corruption, .ident = "AMI BIOS", @@ -761,10 +761,19 @@ static struct dmi_system_id __initdata b DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), }, }, -#endif {} }; +static inline void handle_bad_bios_dmi_table(void) +{ + dmi_check_system(bad_bios_dmi_table); +} +#else +static inline void handle_bad_bios_dmi_table(void) +{ +} +#endif + /* * Determine if we were loaded by an EFI loader. If so, then we have also been * passed the efi memmap, systab, etc., so we should use these data structures @@ -901,7 +910,7 @@ void __init setup_arch(char **cmdline_p) dmi_scan_machine(); - dmi_check_system(bad_bios_dmi_table); + handle_bad_bios_dmi_table(); #ifdef CONFIG_X86_32 probe_roms(); _