Message ID | 20180716235905.6387-2-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 7/17/2018 2:58 AM, Bart Van Assche wrote: > Since the next patch will change the return type of these functions > into a const pointer and since the iSER driver modifies the work request > these functions return a pointer two, inline two work request conversion > function calls. This patch does not change any functionality. > > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Reviewed-by: Sagi Grimberg <sagi@grimberg.me> > Cc: Max Gurtovoy <maxg@mellanox.com> > --- > drivers/infiniband/ulp/iser/iser_memory.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c > index ca844a926e6a..a77d020cc89d 100644 > --- a/drivers/infiniband/ulp/iser/iser_memory.c > +++ b/drivers/infiniband/ulp/iser/iser_memory.c > @@ -405,7 +405,8 @@ iser_reg_sig_mr(struct iscsi_iser_task *iser_task, > > ib_update_fast_reg_key(mr, ib_inc_rkey(mr->rkey)); > > - wr = sig_handover_wr(iser_tx_next_wr(tx_desc)); > + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_sig_handover_wr, > + wr); > wr->wr.opcode = IB_WR_REG_SIG_MR; > wr->wr.wr_cqe = cqe; > wr->wr.sg_list = &data_reg->sge; > @@ -457,7 +458,7 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task, > return n < 0 ? n : -EINVAL; > } > > - wr = reg_wr(iser_tx_next_wr(tx_desc)); > + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_reg_wr, wr); > wr->wr.opcode = IB_WR_REG_MR; > wr->wr.wr_cqe = cqe; > wr->wr.send_flags = 0; > Looks good, Reviewed-by: Max Gurtovoy <maxg@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index ca844a926e6a..a77d020cc89d 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -405,7 +405,8 @@ iser_reg_sig_mr(struct iscsi_iser_task *iser_task, ib_update_fast_reg_key(mr, ib_inc_rkey(mr->rkey)); - wr = sig_handover_wr(iser_tx_next_wr(tx_desc)); + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_sig_handover_wr, + wr); wr->wr.opcode = IB_WR_REG_SIG_MR; wr->wr.wr_cqe = cqe; wr->wr.sg_list = &data_reg->sge; @@ -457,7 +458,7 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task, return n < 0 ? n : -EINVAL; } - wr = reg_wr(iser_tx_next_wr(tx_desc)); + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_reg_wr, wr); wr->wr.opcode = IB_WR_REG_MR; wr->wr.wr_cqe = cqe; wr->wr.send_flags = 0;