Commit 51e8463c authored by Jason Gunthorpe's avatar Jason Gunthorpe

RDMA/cm: Remove needless cm_id variable

Just put the expression in the only reader

Link: https://lore.kernel.org/r/20200506074701.9775-10-leon@kernel.orgSigned-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 1cc44279
...@@ -1958,7 +1958,6 @@ static struct cm_id_private * cm_match_req(struct cm_work *work, ...@@ -1958,7 +1958,6 @@ static struct cm_id_private * cm_match_req(struct cm_work *work,
struct cm_id_private *listen_cm_id_priv, *cur_cm_id_priv; struct cm_id_private *listen_cm_id_priv, *cur_cm_id_priv;
struct cm_timewait_info *timewait_info; struct cm_timewait_info *timewait_info;
struct cm_req_msg *req_msg; struct cm_req_msg *req_msg;
struct ib_cm_id *cm_id;
req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
...@@ -1988,8 +1987,7 @@ static struct cm_id_private * cm_match_req(struct cm_work *work, ...@@ -1988,8 +1987,7 @@ static struct cm_id_private * cm_match_req(struct cm_work *work,
IB_CM_REJ_STALE_CONN, CM_MSG_RESPONSE_REQ, IB_CM_REJ_STALE_CONN, CM_MSG_RESPONSE_REQ,
NULL, 0); NULL, 0);
if (cur_cm_id_priv) { if (cur_cm_id_priv) {
cm_id = &cur_cm_id_priv->id; ib_send_cm_dreq(&cur_cm_id_priv->id, NULL, 0);
ib_send_cm_dreq(cm_id, NULL, 0);
cm_deref_id(cur_cm_id_priv); cm_deref_id(cur_cm_id_priv);
} }
return NULL; return NULL;
...@@ -2433,7 +2431,6 @@ static int cm_rep_handler(struct cm_work *work) ...@@ -2433,7 +2431,6 @@ static int cm_rep_handler(struct cm_work *work)
struct cm_rep_msg *rep_msg; struct cm_rep_msg *rep_msg;
int ret; int ret;
struct cm_id_private *cur_cm_id_priv; struct cm_id_private *cur_cm_id_priv;
struct ib_cm_id *cm_id;
struct cm_timewait_info *timewait_info; struct cm_timewait_info *timewait_info;
rep_msg = (struct cm_rep_msg *)work->mad_recv_wc->recv_buf.mad; rep_msg = (struct cm_rep_msg *)work->mad_recv_wc->recv_buf.mad;
...@@ -2499,8 +2496,7 @@ static int cm_rep_handler(struct cm_work *work) ...@@ -2499,8 +2496,7 @@ static int cm_rep_handler(struct cm_work *work)
IBA_GET(CM_REP_REMOTE_COMM_ID, rep_msg)); IBA_GET(CM_REP_REMOTE_COMM_ID, rep_msg));
if (cur_cm_id_priv) { if (cur_cm_id_priv) {
cm_id = &cur_cm_id_priv->id; ib_send_cm_dreq(&cur_cm_id_priv->id, NULL, 0);
ib_send_cm_dreq(cm_id, NULL, 0);
cm_deref_id(cur_cm_id_priv); cm_deref_id(cur_cm_id_priv);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment