From 72c0542e45fa48cc748c85dbd41ce8a434f931f7 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 19 Aug 2003 07:22:48 -0700 Subject: [PATCH] [x86] Kill warning in dmi_scan.c - Wrap unused function in same #ifdef as caller. - Boggle as to WTF CONFIG_MOUNT_ROOT_FAILED_MSG is supposed to do. --- arch/i386/kernel/dmi_scan.c | 44 +++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 058fd47d1137e..519112155c0f4 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -162,20 +162,6 @@ enum static char *dmi_ident[DMI_STRING_MAX]; -/* print some information suitable for a blacklist entry. */ -static void dmi_dump_system(void) -{ - printk("DMI: BIOS: %.40s, %.40s, %.40s\n", - dmi_ident[DMI_BIOS_VENDOR], dmi_ident[DMI_BIOS_VERSION], - dmi_ident[DMI_BIOS_DATE]); - printk("DMI: System: %.40s, %.40s, %.40s\n", - dmi_ident[DMI_SYS_VENDOR], dmi_ident[DMI_PRODUCT_NAME], - dmi_ident[DMI_PRODUCT_VERSION]); - printk("DMI: Board: %.40s, %.40s, %.40s\n", - dmi_ident[DMI_BOARD_VENDOR], dmi_ident[DMI_BOARD_NAME], - dmi_ident[DMI_BOARD_VERSION]); -} - /* * Save a DMI string */ @@ -1118,6 +1104,25 @@ void __init dmi_scan_machine(void) EXPORT_SYMBOL(is_unsafe_smbus); #ifdef CONFIG_MOUNT_ROOT_FAILED_MSG + + +#ifdef CONFIG_ACPI_BOOT + +/* print some information suitable for a blacklist entry. */ +static void dmi_dump_system(void) +{ + printk("DMI: BIOS: %.40s, %.40s, %.40s\n", + dmi_ident[DMI_BIOS_VENDOR], dmi_ident[DMI_BIOS_VERSION], + dmi_ident[DMI_BIOS_DATE]); + printk("DMI: System: %.40s, %.40s, %.40s\n", + dmi_ident[DMI_SYS_VENDOR], dmi_ident[DMI_PRODUCT_NAME], + dmi_ident[DMI_PRODUCT_VERSION]); + printk("DMI: Board: %.40s, %.40s, %.40s\n", + dmi_ident[DMI_BOARD_VENDOR], dmi_ident[DMI_BOARD_NAME], + dmi_ident[DMI_BOARD_VERSION]); +} + + /* * mount_root_failed_msg() * @@ -1130,13 +1135,20 @@ EXPORT_SYMBOL(is_unsafe_smbus); void mount_root_failed_msg(void) { -#ifdef CONFIG_ACPI_BOOT printk ("Try booting with pci=noacpi, acpi=ht, " "or acpi=off on the command line.\n"); printk ("If one helps, please report the following lines:\n"); dmi_dump_system(); -#endif } +#else + +void mount_root_failed_msg(void) +{ + +} + +#endif + #endif /* CONFIG_MOUNT_ROOT_FAILED_MSG */ -- 2.53.0