@@ -130,7 +130,7 @@ static void set_frmr_seg(struct hns_roce_v2_rc_send_wqe *rc_sq_wqe,
130
130
131
131
static void set_atomic_seg (const struct ib_send_wr * wr , void * wqe ,
132
132
struct hns_roce_v2_rc_send_wqe * rc_sq_wqe ,
133
- int valid_num_sge )
133
+ unsigned int valid_num_sge )
134
134
{
135
135
struct hns_roce_wqe_atomic_seg * aseg ;
136
136
@@ -151,12 +151,12 @@ static void set_atomic_seg(const struct ib_send_wr *wr, void *wqe,
151
151
}
152
152
153
153
static void set_extend_sge (struct hns_roce_qp * qp , const struct ib_send_wr * wr ,
154
- unsigned int * sge_ind , int valid_num_sge )
154
+ unsigned int * sge_ind , unsigned int valid_num_sge )
155
155
{
156
156
struct hns_roce_v2_wqe_data_seg * dseg ;
157
+ unsigned int cnt = valid_num_sge ;
157
158
struct ib_sge * sge = wr -> sg_list ;
158
159
unsigned int idx = * sge_ind ;
159
- int cnt = valid_num_sge ;
160
160
161
161
if (qp -> ibqp .qp_type == IB_QPT_RC || qp -> ibqp .qp_type == IB_QPT_UC ) {
162
162
cnt -= HNS_ROCE_SGE_IN_WQE ;
@@ -177,7 +177,7 @@ static void set_extend_sge(struct hns_roce_qp *qp, const struct ib_send_wr *wr,
177
177
static int set_rwqe_data_seg (struct ib_qp * ibqp , const struct ib_send_wr * wr ,
178
178
struct hns_roce_v2_rc_send_wqe * rc_sq_wqe ,
179
179
void * wqe , unsigned int * sge_ind ,
180
- int valid_num_sge )
180
+ unsigned int valid_num_sge )
181
181
{
182
182
struct hns_roce_dev * hr_dev = to_hr_dev (ibqp -> device );
183
183
struct hns_roce_v2_wqe_data_seg * dseg = wqe ;
@@ -269,10 +269,11 @@ static int check_send_valid(struct hns_roce_dev *hr_dev,
269
269
return 0 ;
270
270
}
271
271
272
- static inline int calc_wr_sge_num (const struct ib_send_wr * wr , u32 * sge_len )
272
+ static unsigned int calc_wr_sge_num (const struct ib_send_wr * wr ,
273
+ unsigned int * sge_len )
273
274
{
274
- int valid_num = 0 ;
275
- u32 len = 0 ;
275
+ unsigned int valid_num = 0 ;
276
+ unsigned int len = 0 ;
276
277
int i ;
277
278
278
279
for (i = 0 ; i < wr -> num_sge ; i ++ ) {
@@ -403,7 +404,7 @@ static inline int set_rc_wqe(struct hns_roce_qp *qp,
403
404
{
404
405
struct hns_roce_v2_rc_send_wqe * rc_sq_wqe = wqe ;
405
406
unsigned int curr_idx = * sge_idx ;
406
- int valid_num_sge ;
407
+ unsigned int valid_num_sge ;
407
408
u32 msg_len = 0 ;
408
409
int ret = 0 ;
409
410
0 commit comments