Skip to content

Commit

Permalink
prov/efa: Remove sgl_idx variable
Browse files Browse the repository at this point in the history
This variable always has the same value as the loop variable

Signed-off-by: Sai Sunku <sunkusa@amazon.com>
  • Loading branch information
sunkuamzn committed Jan 4, 2023
1 parent 2b3a7de commit 65ef34a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions prov/efa/src/efa_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ static void efa_post_send_sgl(struct efa_ep *ep, const struct fi_msg *msg,
struct efa_mr *efa_mr;
struct ibv_send_wr *wr = &ewr->wr;
struct ibv_sge *sge;
size_t sgl_idx = 0;
uint32_t length;
uintptr_t addr;
size_t i;
Expand All @@ -295,7 +294,7 @@ static void efa_post_send_sgl(struct efa_ep *ep, const struct fi_msg *msg,
wr->sg_list = ewr->sge;

for (i = 0; i < msg->iov_count; i++) {
sge = &wr->sg_list[sgl_idx];
sge = &wr->sg_list[i];
addr = (uintptr_t)msg->msg_iov[i].iov_base;
length = msg->msg_iov[i].iov_len;

Expand All @@ -315,7 +314,6 @@ static void efa_post_send_sgl(struct efa_ep *ep, const struct fi_msg *msg,
efa_mr = (struct efa_mr *)msg->desc[i];
sge->lkey = efa_mr->ibv_mr->lkey;
sge->addr = addr;
sgl_idx++;
}
}

Expand Down

0 comments on commit 65ef34a

Please sign in to comment.