From: Robin Murphy Date: Tue, 13 Sep 2022 11:47:20 +0000 (+0100) Subject: iommu/iova: Fix module config properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a37f21dbb8bd21086be80a2898e3b0b4f85ca8cc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git iommu/iova: Fix module config properly [ Upstream commit 4f58330fcc8482aa90674e1f40f601e82f18ed4a ] IOMMU_IOVA is intended to be an optional library for users to select as and when they desire. Since it can be a module now, this means that built-in code which has chosen not to select it should not fail to link if it happens to have selected as a module by someone else. Replace IS_ENABLED() with IS_REACHABLE() to do the right thing. CC: Thierry Reding Reported-by: John Garry Fixes: 15bbdec3931e ("iommu: Make the iova library a module") Signed-off-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/548c2f683ca379aface59639a8f0cccc3a1ac050.1663069227.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- diff --git a/include/linux/iova.h b/include/linux/iova.h index 7d23bbb887f2..641e62700ef3 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -131,7 +131,7 @@ static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova) return iova >> iova_shift(iovad); } -#if IS_ENABLED(CONFIG_IOMMU_IOVA) +#if IS_REACHABLE(CONFIG_IOMMU_IOVA) int iova_cache_get(void); void iova_cache_put(void);