Skip to content

Commit

Permalink
libhns: Clean up signed-unsigned mix with relational issue
Browse files Browse the repository at this point in the history
Clean up signed-unsigned mix with relational issue.

Fixes: 36446a5 ("libhns: Extended QP supports the new post send mechanism")
Signed-off-by: Junxian Huang <[email protected]>
  • Loading branch information
Junxian Huang authored and Junxian Huang committed Apr 18, 2024
1 parent 0067aad commit 7947512
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions providers/hns/hns_roce_u_hw_v2.c
Expand Up @@ -2242,8 +2242,8 @@ static void set_inline_data_list_rc(struct hns_roce_qp *qp,
{
unsigned int msg_len = qp->sge_info.total_len;
void *dseg;
size_t i;
int ret;
int i;

hr_reg_enable(wqe, RCWQE_INLINE);

Expand Down Expand Up @@ -2302,7 +2302,7 @@ static void wr_set_inline_data_list_rc(struct ibv_qp_ex *ibv_qp, size_t num_buf,
{
struct hns_roce_qp *qp = to_hr_qp(&ibv_qp->qp_base);
struct hns_roce_rc_sq_wqe *wqe = qp->cur_wqe;
int i;
size_t i;

if (!wqe)
return;
Expand Down Expand Up @@ -2432,7 +2432,7 @@ static void wr_set_sge_list_ud(struct ibv_qp_ex *ibv_qp, size_t num_sge,
}

hr_reg_write(wqe, UDWQE_MSG_START_SGE_IDX, sge_idx & mask);
for (int i = 0; i < num_sge; i++) {
for (size_t i = 0; i < num_sge; i++) {
if (!sg_list[i].length)
continue;

Expand All @@ -2458,8 +2458,8 @@ static void set_inline_data_list_ud(struct hns_roce_qp *qp,
uint8_t data[HNS_ROCE_MAX_UD_INL_INN_SZ] = {};
unsigned int msg_len = qp->sge_info.total_len;
void *tmp;
size_t i;
int ret;
int i;

if (!check_inl_data_len(qp, msg_len)) {
qp->err = EINVAL;
Expand Down Expand Up @@ -2520,7 +2520,7 @@ static void wr_set_inline_data_list_ud(struct ibv_qp_ex *ibv_qp, size_t num_buf,
{
struct hns_roce_qp *qp = to_hr_qp(&ibv_qp->qp_base);
struct hns_roce_ud_sq_wqe *wqe = qp->cur_wqe;
int i;
size_t i;

if (!wqe)
return;
Expand Down

0 comments on commit 7947512

Please sign in to comment.