[for-next,5/5] RDMA/rxe: Rename iova_to_vaddr to rxe_map_iova

Message ID 1668141135-2-1-git-send-email-lizhijian@fujitsu.com
State New
Headers
Series iova_to_vaddr refactor |

Commit Message

Zhijian Li (Fujitsu) Nov. 11, 2022, 4:32 a.m. UTC
  be pair with rxe_unmap_vaddr

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 drivers/infiniband/sw/rxe/rxe_loc.h  | 2 +-
 drivers/infiniband/sw/rxe/rxe_mr.c   | 4 ++--
 drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index 22a8c44d39c8..496e29215e0f 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -72,7 +72,7 @@  int rxe_mr_copy(struct rxe_mr *mr, u64 iova, void *addr, int length,
 		enum rxe_mr_copy_dir dir);
 int copy_data(struct rxe_pd *pd, int access, struct rxe_dma_info *dma,
 	      void *addr, int length, enum rxe_mr_copy_dir dir);
-void *iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length);
+void *rxe_map_iova(struct rxe_mr *mr, u64 iova, int length);
 void rxe_unmap_vaddr(struct rxe_mr *mr, void *vaddr);
 struct rxe_mr *lookup_mr(struct rxe_pd *pd, int access, u32 key,
 			 enum rxe_mr_lookup_type type);
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index d26a4a33119c..e46ea2a7179c 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -264,7 +264,7 @@  static void *__iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length)
 }
 
 /* must call rxe_unmap_vaddr to unmap vaddr */
-void *iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length)
+void *rxe_map_iova(struct rxe_mr *mr, u64 iova, int length)
 {
 	if (mr->state != RXE_MR_STATE_VALID) {
 		pr_warn("mr not in valid state\n");
@@ -321,7 +321,7 @@  int rxe_mr_copy(struct rxe_mr *mr, u64 iova, void *addr, int length,
 		if (bytes > length)
 			bytes = length;
 
-		va = iova_to_vaddr(mr, iova, bytes);
+		va = rxe_map_iova(mr, iova, bytes);
 		if (!va)
 			return -EFAULT;
 
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 765cb9f8538a..831d71e2054c 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -615,8 +615,8 @@  static enum resp_states atomic_reply(struct rxe_qp *qp,
 			goto out;
 		}
 
-		vaddr = iova_to_vaddr(mr, qp->resp.va + qp->resp.offset,
-					sizeof(u64));
+		vaddr = rxe_map_iova(mr, qp->resp.va + qp->resp.offset,
+				     sizeof(u64));
 
 		/* check vaddr is 8 bytes aligned. */
 		if (!vaddr || (uintptr_t)vaddr & 7) {