aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_loc.h
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2018-11-03 08:13:18 -0400
committerJason Gunthorpe <jgg@mellanox.com>2018-11-08 14:22:54 -0700
commita854b1e89083781925fbad64e37bcb03c38082a7 (patch)
treec8e0558b374950c493b0603605bb317eb0a986e4 /drivers/infiniband/sw/rxe/rxe_loc.h
parentRDMA/rxe: Add link_down, rdma_sends, rdma_recvs stats counters (diff)
downloadlinux-dev-a854b1e89083781925fbad64e37bcb03c38082a7.tar.xz
linux-dev-a854b1e89083781925fbad64e37bcb03c38082a7.zip
IB/rxe: move the variable into the function that uses it
The variable rxe is only used in the function rxe_xmit_packet, and the caller functions do not use it. So move this variable into the function rxe_xmit_packet. Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_loc.h')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_loc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index afd53f57a62b..a675c9f2b427 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -250,11 +250,12 @@ static inline unsigned int wr_opcode_mask(int opcode, struct rxe_qp *qp)
return rxe_wr_opcode_info[opcode].mask[qp->ibqp.qp_type];
}
-static inline int rxe_xmit_packet(struct rxe_dev *rxe, struct rxe_qp *qp,
- struct rxe_pkt_info *pkt, struct sk_buff *skb)
+static inline int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
+ struct sk_buff *skb)
{
int err;
int is_request = pkt->mask & RXE_REQ_MASK;
+ struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
if ((is_request && (qp->req.state != QP_STATE_READY)) ||
(!is_request && (qp->resp.state != QP_STATE_READY))) {