]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: iommu: fix build when neither PCI or IBMVIO is set
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 4 Apr 2021 19:26:23 +0000 (12:26 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Apr 2021 11:17:46 +0000 (21:17 +1000)
commitcb9925370758c94884e2fa72217a5f0dc905b60d
tree391c4626d560c7e6ddd1c2c7486008da02f30d80
parent170dd61775cd617f75ebf973748456fca39a3ff7
powerpc: iommu: fix build when neither PCI or IBMVIO is set

When neither CONFIG_PCI nor CONFIG_IBMVIO is set/enabled, iommu.c has a
build error. The fault injection code is not useful in that kernel config,
so make the FAIL_IOMMU option depend on PCI || IBMVIO.

Prevents this build error (warning escalated to error):
../arch/powerpc/kernel/iommu.c:178:30: error: 'fail_iommu_bus_notifier' defined but not used [-Werror=unused-variable]
  178 | static struct notifier_block fail_iommu_bus_notifier = {

Fixes: 07b430e62985 ("powerpc: IOMMU fault injection")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210404192623.10697-1-rdunlap@infradead.org
arch/powerpc/Kconfig.debug