[PATCH 54/60][SRU][OEM-5.6] UBUNTU: SAUCE: iommu/renesas: Fix unused-function warning
You-Sheng Yang
vicamo.yang at canonical.com
Tue May 26 13:01:58 UTC 2020
From: Arnd Bergmann <arnd at arndb.de>
BugLink: https://bugs.launchpad.net/bugs/1876707
gcc warns because the only reference to ipmmu_find_group
is inside of an #ifdef:
drivers/iommu/ipmmu-vmsa.c:878:28: error: 'ipmmu_find_group' defined but not used [-Werror=unused-function]
Change the #ifdef to an equivalent IS_ENABLED().
Fixes: 6580c8a78424 ("iommu/renesas: Convert to probe/release_device() call-backs")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Reviewed-by: Simon Horman <horms at verge.net.au>
Link: https://lore.kernel.org/r/20200508220224.688985-1-arnd@arndb.de
Signed-off-by: Joerg Roedel <jroedel at suse.de>
(cherry picked from commit 2ba20b5a5b8f948d498f4b38ba910ff339e609ef
iommu/next)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/iommu/ipmmu-vmsa.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index fb7e702dee23..4c2972f3153b 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -903,11 +903,8 @@ static const struct iommu_ops ipmmu_ops = {
.probe_device = ipmmu_probe_device,
.release_device = ipmmu_release_device,
.probe_finalize = ipmmu_probe_finalize,
-#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
- .device_group = generic_device_group,
-#else
- .device_group = ipmmu_find_group,
-#endif
+ .device_group = IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_IOMMU_DMA)
+ ? generic_device_group : ipmmu_find_group,
.pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
.of_xlate = ipmmu_of_xlate,
};
--
2.25.1
More information about the kernel-team
mailing list