From 16f2371704a09b0cdf127a405f0dc358fa5dc60b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 1 Nov 2018 03:52:40 +0000 Subject: [PATCH] ib_srpt: Inline functions with a body of one line (merge r7276 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7532 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 50 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index f7dacb7e4..b198fb5a0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2983,38 +2983,6 @@ static void srpt_cm_rtu_recv(struct srpt_rdma_ch *ch) ch->sess_name, ch->qp->qp_num); } -static void srpt_cm_timewait_exit(struct srpt_rdma_ch *ch) -{ - pr_info("Received CM TimeWait exit for ch %s-%d.\n", ch->sess_name, - ch->qp->qp_num); - srpt_close_ch(ch); -} - -static void srpt_cm_rep_error(struct srpt_rdma_ch *ch) -{ - pr_info("Received CM REP error for ch %s-%d.\n", ch->sess_name, - ch->qp->qp_num); -} - -/** - * srpt_cm_dreq_recv() - Process reception of a DREQ message. - */ -static int srpt_cm_dreq_recv(struct srpt_rdma_ch *ch) -{ - srpt_disconnect_ch(ch); - return 0; -} - -/** - * srpt_cm_drep_recv() - Process reception of a DREP message. - */ -static void srpt_cm_drep_recv(struct srpt_rdma_ch *ch) -{ - pr_info("Received CM DREP message for ch %s-%d.\n", ch->sess_name, - ch->qp->qp_num); - srpt_close_ch(ch); -} - /** * srpt_cm_handler() - IB connection manager callback function. * @@ -3048,16 +3016,17 @@ static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) srpt_cm_rtu_recv(ch); break; case IB_CM_DREQ_RECEIVED: - ret = srpt_cm_dreq_recv(ch); + srpt_disconnect_ch(ch); break; case IB_CM_DREP_RECEIVED: - srpt_cm_drep_recv(ch); + srpt_close_ch(ch); break; case IB_CM_TIMEWAIT_EXIT: - srpt_cm_timewait_exit(ch); + srpt_close_ch(ch); break; case IB_CM_REP_ERROR: - srpt_cm_rep_error(ch); + pr_info("Received CM REP error for ch %s-%d.\n", ch->sess_name, + ch->qp->qp_num); break; case IB_CM_DREQ_ERROR: pr_info("Received CM DREQ ERROR event.\n"); @@ -3093,15 +3062,16 @@ static int srpt_rdma_cm_handler(struct rdma_cm_id *cm_id, break; case RDMA_CM_EVENT_DISCONNECTED: if (ch->state < CH_DISCONNECTING) - srpt_cm_dreq_recv(ch); + srpt_disconnect_ch(ch); else - srpt_cm_drep_recv(ch); + srpt_close_ch(ch); break; case RDMA_CM_EVENT_TIMEWAIT_EXIT: - srpt_cm_timewait_exit(ch); + srpt_close_ch(ch); break; case RDMA_CM_EVENT_UNREACHABLE: - srpt_cm_rep_error(ch); + pr_info("Received CM REP error for ch %s-%d.\n", ch->sess_name, + ch->qp->qp_num); break; case RDMA_CM_EVENT_DEVICE_REMOVAL: case RDMA_CM_EVENT_ADDR_CHANGE: