[openib-general] [PATCH][SDP][18/22] Remove use of leading underscores in static names in sdp_rcvd.c

Tom Duffy Tom.Duffy at Sun.COM
Mon Feb 28 14:03:04 PST 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: drivers/infiniband/ulp/sdp/sdp_rcvd.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_rcvd.c	(revision 1929)
+++ drivers/infiniband/ulp/sdp/sdp_rcvd.c	(working copy)
@@ -38,7 +38,7 @@
  * Specific MID handler functions. (RECV)
  */
 
-static int _sdp_rcvd_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	int result = 0;
 
@@ -114,7 +114,7 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	int result = 0;
 
@@ -144,7 +144,7 @@ static int _sdp_rcvd_abort(struct sdp_op
 	return result;
 }
 
-static int _sdp_rcvd_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
 	int result;
@@ -187,7 +187,7 @@ static int _sdp_rcvd_send_sm(struct sdp_
 	return 0;
 }
 
-static int _sdp_rcvd_rdma_wr(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_rdma_wr(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_rwch *rwch;
 	struct sdpc_iocb *iocb;
@@ -196,7 +196,7 @@ static int _sdp_rcvd_rdma_wr(struct sdp_
 	rwch = (struct msg_hdr_rwch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rwch);
 
-	_sdp_msg_net_to_cpu_rwch(rwch);
+	sdp_msg_net_to_cpu_rwch(rwch);
 	/*
 	 * lookup active IOCB read.
 	 */
@@ -248,7 +248,7 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_rdma_rd(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_rdma_rd(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_rrch *rrch;
 	struct sdpc_iocb *iocb;
@@ -257,7 +257,7 @@ static int _sdp_rcvd_rdma_rd(struct sdp_
 	rrch = (struct msg_hdr_rrch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rrch);
 
-	_sdp_msg_net_to_cpu_rrch(rrch);
+	sdp_msg_net_to_cpu_rrch(rrch);
 	/*
 	 * lookup IOCB read.
 	 */
@@ -330,7 +330,7 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_mode_change(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_mode_change(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_mch *mch;
 	int result;
@@ -338,7 +338,7 @@ static int _sdp_rcvd_mode_change(struct 
 	mch = (struct msg_hdr_mch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_mch);
 
-	_sdp_msg_net_to_cpu_mch(mch);
+	sdp_msg_net_to_cpu_mch(mch);
 
 	sdp_dbg_ctrl(conn, "Mode request <%d> from current mode. <%d:%d>",
 		     SDP_MSG_MCH_GET_MODE(mch), conn->recv_mode,
@@ -426,7 +426,7 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_src_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_src_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_advt *advt;
 	int result;
@@ -516,7 +516,7 @@ done:
 	return result;
 }
 
-static int _sdp_rcvd_snk_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_snk_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_advt *advt;
 	s32 counter;
@@ -588,10 +588,9 @@ done:
 }
 
 /*
- * _sdp_rcvd_snk_cancel_ack - sink cancel confirmantion
+ * sdp_rcvd_snk_cancel_ack - sink cancel confirmantion
  */
-static int _sdp_rcvd_snk_cancel_ack(struct sdp_opt *conn, 
-				    struct sdpc_buff *buff)
+static int sdp_rcvd_snk_cancel_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
 	int result;
@@ -627,10 +626,10 @@ done:
 }
 
 /*
- * _sdp_rcvd_resize_buff_ack - buffer size change request
+ * sdp_rcvd_resize_buff_ack - buffer size change request
  */
-static int _sdp_rcvd_resize_buff_ack(struct sdp_opt *conn,
-				     struct sdpc_buff *buff)
+static int sdp_rcvd_resize_buff_ack(struct sdp_opt *conn,
+				    struct sdpc_buff *buff)
 {
 	struct msg_hdr_crbh *crbh;
 	int result;
@@ -638,7 +637,7 @@ static int _sdp_rcvd_resize_buff_ack(str
 	crbh = (struct msg_hdr_crbh *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_crbh);
 
-	_sdp_msg_net_to_cpu_crbh(crbh);
+	sdp_msg_net_to_cpu_crbh(crbh);
 	/*
 	 * request to change our recv buffer size, we're pretty much locked
 	 * into the size we're using, once the connection is set up, so we
@@ -659,24 +658,24 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_suspend(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_suspend(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_sch *sch;
 
 	sch = (struct msg_hdr_sch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_sch);
 
-	_sdp_msg_net_to_cpu_sch(sch);
+	sdp_msg_net_to_cpu_sch(sch);
 
 	return 0;
 }
 
-static int _sdp_rcvd_suspend_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_suspend_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	return 0;
 }
 
-static int _sdp_rcvd_snk_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_snk_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_snkah *snkah;
 	struct sdpc_advt *advt;
@@ -686,7 +685,7 @@ static int _sdp_rcvd_snk_avail(struct sd
 	snkah = (struct msg_hdr_snkah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_snkah);
 
-	_sdp_msg_net_to_cpu_snkah(snkah);
+	sdp_msg_net_to_cpu_snkah(snkah);
 
 	sdp_dbg_data(conn, "SnkAvail received. <%d:%d:%016llx> mode <%d>",
 		     snkah->size, snkah->r_key,
@@ -810,7 +809,7 @@ error:
 	return result;
 }
 
-static int _sdp_rcvd_src_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_src_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_srcah *srcah;
 	struct sdpc_advt *advt;
@@ -820,7 +819,7 @@ static int _sdp_rcvd_src_avail(struct sd
 	srcah = (struct msg_hdr_srcah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_srcah);
 
-	_sdp_msg_net_to_cpu_srcah(srcah);
+	sdp_msg_net_to_cpu_srcah(srcah);
 
 	size = buff->tail - buff->data;
 
@@ -978,9 +977,9 @@ done:
 }
 
 /*
- * _sdp_rcvd_data - SDP data message event received
+ * sdp_rcvd_data - SDP data message event received
  */
-static int _sdp_rcvd_data(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_data(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	int ret_val;
 
@@ -1023,9 +1022,9 @@ static int _sdp_rcvd_data(struct sdp_opt
 }
 
 /*
- * _sdp_rcvd_unsupported - Valid messages we're not expecting
+ * sdp_rcvd_unsupported - Valid messages we're not expecting
  */
-static int _sdp_rcvd_unsupported(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_unsupported(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
 	/*
 	 * Since the gateway only initates RDMA's but is never a target, and
@@ -1052,38 +1051,38 @@ static int _sdp_rcvd_unsupported(struct 
 #define SDP_MSG_EVENT_TABLE_SIZE 0x20
 
 static sdp_event_cb_func recv_event_funcs[SDP_MSG_EVENT_TABLE_SIZE] = {
-	NULL,                       /* SDP_MID_HELLO            0x00 */
-	NULL,                       /* SDP_MID_HELLO_ACK        0x01 */
-	_sdp_rcvd_disconnect,       /* SDP_MID_DISCONNECT       0x02 */
-	_sdp_rcvd_abort,            /* SDP_MID_ABORT_CONN       0x03 */
-	_sdp_rcvd_send_sm,          /* SDP_MID_SEND_SM          0x04 */
-	_sdp_rcvd_rdma_wr,          /* SDP_MID_RDMA_WR_COMP     0x05 */
-	_sdp_rcvd_rdma_rd,          /* SDP_MID_RDMA_RD_COMP     0x06 */
-	_sdp_rcvd_mode_change,      /* SDP_MID_MODE_CHANGE      0x07 */
-	_sdp_rcvd_src_cancel,       /* SDP_MID_SRC_CANCEL       0x08 */
-	_sdp_rcvd_snk_cancel,       /* SDP_MID_SNK_CANCEL       0x09 */
-	_sdp_rcvd_snk_cancel_ack,   /* SDP_MID_SNK_CANCEL_ACK   0x0A */
-	_sdp_rcvd_resize_buff_ack,  /* SDP_MID_CH_RECV_BUF      0x0B */
-	_sdp_rcvd_unsupported,      /* SDP_MID_CH_RECV_BUF_ACK  0x0C */
-	_sdp_rcvd_suspend,          /* SDP_MID_SUSPEND          0x0D */
-	_sdp_rcvd_suspend_ack,      /* SDP_MID_SUSPEND_ACK      0x0E */
-	NULL,                       /* reserved                    0x0F */
-	NULL,                       /* reserved                    0xF0 */
-	NULL,                       /* reserved                    0xF1 */
-	NULL,                       /* reserved                    0xF2 */
-	NULL,                       /* reserved                    0xF3 */
-	NULL,                       /* reserved                    0xF4 */
-	NULL,                       /* reserved                    0xF5 */
-	NULL,                       /* reserved                    0xF6 */
-	NULL,                       /* reserved                    0xF7 */
-	NULL,                       /* reserved                    0xF8 */
-	NULL,                       /* reserved                    0xF9 */
-	NULL,                       /* reserved                    0xFA */
-	NULL,                       /* reserved                    0xFB */
-	NULL,                       /* reserved                    0xFC */
-	_sdp_rcvd_snk_avail,        /* SDP_MID_SNK_AVAIL        0xFD */
-	_sdp_rcvd_src_avail,        /* SDP_MID_SRC_AVAIL        0xFE */
-	_sdp_rcvd_data              /* SDP_MID_DATA             0xFF */
+	NULL,                      /* SDP_MID_HELLO            0x00 */
+	NULL,                      /* SDP_MID_HELLO_ACK        0x01 */
+	sdp_rcvd_disconnect,       /* SDP_MID_DISCONNECT       0x02 */
+	sdp_rcvd_abort,            /* SDP_MID_ABORT_CONN       0x03 */
+	sdp_rcvd_send_sm,          /* SDP_MID_SEND_SM          0x04 */
+	sdp_rcvd_rdma_wr,          /* SDP_MID_RDMA_WR_COMP     0x05 */
+	sdp_rcvd_rdma_rd,          /* SDP_MID_RDMA_RD_COMP     0x06 */
+	sdp_rcvd_mode_change,      /* SDP_MID_MODE_CHANGE      0x07 */
+	sdp_rcvd_src_cancel,       /* SDP_MID_SRC_CANCEL       0x08 */
+	sdp_rcvd_snk_cancel,       /* SDP_MID_SNK_CANCEL       0x09 */
+	sdp_rcvd_snk_cancel_ack,   /* SDP_MID_SNK_CANCEL_ACK   0x0A */
+	sdp_rcvd_resize_buff_ack,  /* SDP_MID_CH_RECV_BUF      0x0B */
+	sdp_rcvd_unsupported,      /* SDP_MID_CH_RECV_BUF_ACK  0x0C */
+	sdp_rcvd_suspend,          /* SDP_MID_SUSPEND          0x0D */
+	sdp_rcvd_suspend_ack,      /* SDP_MID_SUSPEND_ACK      0x0E */
+	NULL,                      /* reserved                 0x0F */
+	NULL,                      /* reserved                 0xF0 */
+	NULL,                      /* reserved                 0xF1 */
+	NULL,                      /* reserved                 0xF2 */
+	NULL,                      /* reserved                 0xF3 */
+	NULL,                      /* reserved                 0xF4 */
+	NULL,                      /* reserved                 0xF5 */
+	NULL,                      /* reserved                 0xF6 */
+	NULL,                      /* reserved                 0xF7 */
+	NULL,                      /* reserved                 0xF8 */
+	NULL,                      /* reserved                 0xF9 */
+	NULL,                      /* reserved                 0xFA */
+	NULL,                      /* reserved                 0xFB */
+	NULL,                      /* reserved                 0xFC */
+	sdp_rcvd_snk_avail,        /* SDP_MID_SNK_AVAIL        0xFD */
+	sdp_rcvd_src_avail,        /* SDP_MID_SRC_AVAIL        0xFE */
+	sdp_rcvd_data              /* SDP_MID_DATA             0xFF */
 };
 
 /*
@@ -1149,7 +1148,7 @@ int sdp_event_recv(struct sdp_opt *conn,
 
 	buff->bsdh_hdr = (struct msg_hdr_bsdh *) buff->data;
 
-        _sdp_msg_net_to_cpu_bsdh(buff->bsdh_hdr);
+        sdp_msg_net_to_cpu_bsdh(buff->bsdh_hdr);
 
 	if (comp->byte_len != buff->bsdh_hdr->size) {
 		sdp_dbg_warn(conn, 
@@ -1190,7 +1189,7 @@ int sdp_event_recv(struct sdp_opt *conn,
 	 * fast path data messages
 	 */
 	if (SDP_MID_DATA == buff->bsdh_hdr->mid)
-		result = _sdp_rcvd_data(conn, buff);
+		result = sdp_rcvd_data(conn, buff);
 	else {
 		offset = buff->bsdh_hdr->mid & 0x1F;
 




More information about the general mailing list