iommu/amd: Fix compile error for unused function
authorJoerg Roedel <jroedel@suse.de>
Fri, 9 Jun 2023 13:15:08 +0000 (15:15 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Jun 2023 13:18:12 +0000 (15:18 +0200)
commit1ce018df87640adb139c8418785ad3b6e4376bd3
treef445df58aea406fc9a56eada7c4f1f0a45f5ffa3
parentbccc37a8a2fb002a302a526656c56a793a708670
iommu/amd: Fix compile error for unused function

Recent changes introduced a compile error:

drivers/iommu/amd/iommu.c:1285:13: error: ‘iommu_flush_irt_and_complete’ defined but not used [-Werror=unused-function]
 1285 | static void iommu_flush_irt_and_complete(struct amd_iommu *iommu, u16 devid)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

This happens with defconfig-x86_64 because AMD IOMMU is enabled but
CONFIG_IRQ_REMAP is disabled. Move the function under #ifdef
CONFIG_IRQ_REMAP to fix the error.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c