EDAC, skx: Fix skx_edac build error when ACPI_NFIT=m
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 13 May 2018 17:35:44 +0000 (10:35 -0700)
committerBorislav Petkov <bp@suse.de>
Mon, 14 May 2018 09:35:23 +0000 (11:35 +0200)
Prevent build error when CONFIG_ACPI_NFIT=m and CONFIG_EDAC_SKX=y by
limiting EDAC_SKX based on how ACPI_NFIT is set.

Fixes this build error:
  drivers/edac/skx_edac.o: In function `get_nvdimm_info':
  ../drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Fixes: 58ca9ac1463d ("EDAC, skx_edac: Detect non-volatile DIMMs")
Link: http://lkml.kernel.org/r/3af91354-8e19-d2af-1bba-ced8dce053f1@infradead.org
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/Kconfig

index ac40b0f..57304b2 100644 (file)
@@ -232,6 +232,7 @@ config EDAC_SBRIDGE
 config EDAC_SKX
        tristate "Intel Skylake server Integrated MC"
        depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
+       depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
        select DMI
        help
          Support for error detection and correction the Intel