Skip to content

Commit 1e20a2a

Browse files
Bart Van Asschedledford
authored andcommitted
IB/srpt: Inline trivial CM callback functions
Inline those CM callback functions that are only two lines long. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Alex Estrin <[email protected]> Cc: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 49f4016 commit 1e20a2a

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,18 +2320,6 @@ static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id)
23202320
}
23212321
}
23222322

2323-
static void srpt_cm_timewait_exit(struct ib_cm_id *cm_id)
2324-
{
2325-
pr_info("Received IB TimeWait exit for cm_id %p.\n", cm_id);
2326-
srpt_drain_channel(cm_id);
2327-
}
2328-
2329-
static void srpt_cm_rep_error(struct ib_cm_id *cm_id)
2330-
{
2331-
pr_info("Received IB REP error for cm_id %p.\n", cm_id);
2332-
srpt_drain_channel(cm_id);
2333-
}
2334-
23352323
/**
23362324
* srpt_cm_dreq_recv() - Process reception of a DREQ message.
23372325
*/
@@ -2369,15 +2357,6 @@ static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id)
23692357
}
23702358
}
23712359

2372-
/**
2373-
* srpt_cm_drep_recv() - Process reception of a DREP message.
2374-
*/
2375-
static void srpt_cm_drep_recv(struct ib_cm_id *cm_id)
2376-
{
2377-
pr_info("Received InfiniBand DREP message for cm_id %p.\n", cm_id);
2378-
srpt_drain_channel(cm_id);
2379-
}
2380-
23812360
/**
23822361
* srpt_cm_handler() - IB connection manager callback function.
23832362
*
@@ -2409,22 +2388,26 @@ static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
24092388
srpt_cm_dreq_recv(cm_id);
24102389
break;
24112390
case IB_CM_DREP_RECEIVED:
2412-
srpt_cm_drep_recv(cm_id);
2391+
pr_info("Received CM DREP message for cm_id %p.\n",
2392+
cm_id);
2393+
srpt_drain_channel(cm_id);
24132394
break;
24142395
case IB_CM_TIMEWAIT_EXIT:
2415-
srpt_cm_timewait_exit(cm_id);
2396+
pr_info("Received CM TimeWait exit for cm_id %p.\n", cm_id);
2397+
srpt_drain_channel(cm_id);
24162398
break;
24172399
case IB_CM_REP_ERROR:
2418-
srpt_cm_rep_error(cm_id);
2400+
pr_info("Received CM REP error for cm_id %p.\n", cm_id);
2401+
srpt_drain_channel(cm_id);
24192402
break;
24202403
case IB_CM_DREQ_ERROR:
2421-
pr_info("Received IB DREQ ERROR event.\n");
2404+
pr_info("Received CM DREQ ERROR event.\n");
24222405
break;
24232406
case IB_CM_MRA_RECEIVED:
2424-
pr_info("Received IB MRA event\n");
2407+
pr_info("Received CM MRA event\n");
24252408
break;
24262409
default:
2427-
pr_err("received unrecognized IB CM event %d\n", event->event);
2410+
pr_err("received unrecognized CM event %d\n", event->event);
24282411
break;
24292412
}
24302413

0 commit comments

Comments
 (0)