aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-02-11 14:07:29 -0500
committerDoug Ledford <dledford@redhat.com>2016-02-29 17:12:35 -0500
commit1e20a2a5107021144fd795bcb66a272fd80cb477 (patch)
treeb6964eb6ee5edbfd6d52ba7e23fdd0d857d26ace
parent49f40163b66e02acdcdfdd2bf46239683d65806d (diff)
IB/srpt: Inline trivial CM callback functions
Inline those CM callback functions that are only two lines long. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Estrin <alex.estrin@intel.com> Cc: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 64e9107f6f4f..ea7359447590 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2320,18 +2320,6 @@ static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id)
2320 } 2320 }
2321} 2321}
2322 2322
2323static 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
2329static 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
2335/** 2323/**
2336 * srpt_cm_dreq_recv() - Process reception of a DREQ message. 2324 * srpt_cm_dreq_recv() - Process reception of a DREQ message.
2337 */ 2325 */
@@ -2370,15 +2358,6 @@ static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id)
2370} 2358}
2371 2359
2372/** 2360/**
2373 * srpt_cm_drep_recv() - Process reception of a DREP message.
2374 */
2375static 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
2381/**
2382 * srpt_cm_handler() - IB connection manager callback function. 2361 * srpt_cm_handler() - IB connection manager callback function.
2383 * 2362 *
2384 * A non-zero return value will cause the caller destroy the CM ID. 2363 * A non-zero return value will cause the caller destroy the CM ID.
@@ -2409,22 +2388,26 @@ static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
2409 srpt_cm_dreq_recv(cm_id); 2388 srpt_cm_dreq_recv(cm_id);
2410 break; 2389 break;
2411 case IB_CM_DREP_RECEIVED: 2390 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);
2413 break; 2394 break;
2414 case IB_CM_TIMEWAIT_EXIT: 2395 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);
2416 break; 2398 break;
2417 case IB_CM_REP_ERROR: 2399 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);
2419 break; 2402 break;
2420 case IB_CM_DREQ_ERROR: 2403 case IB_CM_DREQ_ERROR:
2421 pr_info("Received IB DREQ ERROR event.\n"); 2404 pr_info("Received CM DREQ ERROR event.\n");
2422 break; 2405 break;
2423 case IB_CM_MRA_RECEIVED: 2406 case IB_CM_MRA_RECEIVED:
2424 pr_info("Received IB MRA event\n"); 2407 pr_info("Received CM MRA event\n");
2425 break; 2408 break;
2426 default: 2409 default:
2427 pr_err("received unrecognized IB CM event %d\n", event->event); 2410 pr_err("received unrecognized CM event %d\n", event->event);
2428 break; 2411 break;
2429 } 2412 }
2430 2413