Skip to content

Commit 2ba20b5

Browse files
arndbjoergroedel
authored andcommitted
iommu/renesas: Fix unused-function warning
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: 6580c8a ("iommu/renesas: Convert to probe/release_device() call-backs") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent f38338c commit 2ba20b5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/iommu/ipmmu-vmsa.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -903,11 +903,8 @@ static const struct iommu_ops ipmmu_ops = {
903903
.probe_device = ipmmu_probe_device,
904904
.release_device = ipmmu_release_device,
905905
.probe_finalize = ipmmu_probe_finalize,
906-
#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
907-
.device_group = generic_device_group,
908-
#else
909-
.device_group = ipmmu_find_group,
910-
#endif
906+
.device_group = IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_IOMMU_DMA)
907+
? generic_device_group : ipmmu_find_group,
911908
.pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
912909
.of_xlate = ipmmu_of_xlate,
913910
};

0 commit comments

Comments
 (0)