firmware/dmi_scan: Uninline dmi_get_bios_year() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 20 Mar 2018 18:07:59 +0000 (20:07 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 27 Mar 2018 09:33:15 +0000 (11:33 +0200)
commit3af345258617e0412059c1ab6462495947f73e89
tree7f9760f17431effe5329a2784837c46dcf4e3965
parent4e07db9c8db87e3b71be4c3cd626ddc9bacd5a1e
firmware/dmi_scan: Uninline dmi_get_bios_year() helper

Uninline dmi_get_bios_year() which, in particular, allows us
to optimize it in the future.

While doing this, convert the function to return an error code
when BIOS date is not present or not parsable, or CONFIG_DMI=n.

Additionally, during the move, add a bit of documentation.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Fixes: 492a1abd61e4 ("dmi: Introduce the dmi_get_bios_year() helper function")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/dmi_scan.c
include/linux/dmi.h