Migrate io-pgtable ARM selftests to use ops->iova_to_phys_length
instead of the deprecated ops->iova_to_phys.

Signed-off-by: Guanghui Feng <[email protected]>
---
 drivers/iommu/io-pgtable-arm-selftests.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iommu/io-pgtable-arm-selftests.c 
b/drivers/iommu/io-pgtable-arm-selftests.c
index 334e70350924..78252344c3d0 100644
--- a/drivers/iommu/io-pgtable-arm-selftests.c
+++ b/drivers/iommu/io-pgtable-arm-selftests.c
@@ -72,13 +72,13 @@ static int arm_lpae_run_tests(struct kunit *test, struct 
io_pgtable_cfg *cfg)
                 * Initial sanity checks.
                 * Empty page tables shouldn't provide any translations.
                 */
-               if (ops->iova_to_phys(ops, 42))
+               if (ops->iova_to_phys_length(ops, 42, NULL) != PHYS_ADDR_MAX)
                        return __FAIL(test, i);
 
-               if (ops->iova_to_phys(ops, SZ_1G + 42))
+               if (ops->iova_to_phys_length(ops, SZ_1G + 42, NULL) != 
PHYS_ADDR_MAX)
                        return __FAIL(test, i);
 
-               if (ops->iova_to_phys(ops, SZ_2G + 42))
+               if (ops->iova_to_phys_length(ops, SZ_2G + 42, NULL) != 
PHYS_ADDR_MAX)
                        return __FAIL(test, i);
 
                /*
@@ -100,7 +100,7 @@ static int arm_lpae_run_tests(struct kunit *test, struct 
io_pgtable_cfg *cfg)
                                            GFP_KERNEL, &mapped))
                                return __FAIL(test, i);
 
-                       if (ops->iova_to_phys(ops, iova + 42) != (iova + 42))
+                       if (ops->iova_to_phys_length(ops, iova + 42, NULL) != 
(iova + 42))
                                return __FAIL(test, i);
 
                        iova += SZ_1G;
@@ -114,7 +114,7 @@ static int arm_lpae_run_tests(struct kunit *test, struct 
io_pgtable_cfg *cfg)
                        if (ops->unmap_pages(ops, iova, size, 1, NULL) != size)
                                return __FAIL(test, i);
 
-                       if (ops->iova_to_phys(ops, iova + 42))
+                       if (ops->iova_to_phys_length(ops, iova + 42, NULL) != 
PHYS_ADDR_MAX)
                                return __FAIL(test, i);
 
                        /* Remap full block */
@@ -122,7 +122,7 @@ static int arm_lpae_run_tests(struct kunit *test, struct 
io_pgtable_cfg *cfg)
                                           IOMMU_WRITE, GFP_KERNEL, &mapped))
                                return __FAIL(test, i);
 
-                       if (ops->iova_to_phys(ops, iova + 42) != (iova + 42))
+                       if (ops->iova_to_phys_length(ops, iova + 42, NULL) != 
(iova + 42))
                                return __FAIL(test, i);
 
                        iova += SZ_1G;
-- 
2.43.7

Reply via email to