]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
IB/iser: Inline two work request conversion functions
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 18 Jul 2018 16:25:13 +0000 (09:25 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 31 Jul 2018 01:59:40 +0000 (19:59 -0600)
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>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/iser/iser_memory.c

index ca844a926e6add96b8063a698304a50fa7a8ffa7..a77d020cc89da9541b997854812497e58c53ddc8 100644 (file)
@@ -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;