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

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


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

Index: drivers/infiniband/ulp/sdp/sdp_recv.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_recv.c	(revision 1929)
+++ drivers/infiniband/ulp/sdp/sdp_recv.c	(working copy)
@@ -39,9 +39,9 @@
  */
 
 /*
- * _sdp_post_recv_buff - post a single buffers for data recv
+ * sdp_post_recv_buff - post a single buffers for data recv
  */
-static int _sdp_post_recv_buff(struct sdp_opt *conn)
+static int sdp_post_recv_buff(struct sdp_opt *conn)
 {
 	struct ib_recv_wr receive_param = { NULL };
 	struct ib_recv_wr *bad_wr;
@@ -113,9 +113,9 @@ error:
 }
 
 /*
- * _sdp_post_rdma_buff - post a single buffers for rdma read on a conn
+ * sdp_post_rdma_buff - post a single buffers for rdma read on a conn
  */
-static int _sdp_post_rdma_buff(struct sdp_opt *conn)
+static int sdp_post_rdma_buff(struct sdp_opt *conn)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -220,9 +220,9 @@ done:
 }
 
 /*
- * _sdp_post_rdma_iocb_src - post a iocb for rdma read on a conn
+ * sdp_post_rdma_iocb_src - post a iocb for rdma read on a conn
  */
-static int _sdp_post_rdma_iocb_src(struct sdp_opt *conn)
+static int sdp_post_rdma_iocb_src(struct sdp_opt *conn)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -351,9 +351,9 @@ done:
 }
 
 /*
- * _sdp_post_rdma_iocb_snk - post a iocb for rdma read on a conn
+ * sdp_post_rdma_iocb_snk - post a iocb for rdma read on a conn
  */
-static int _sdp_post_rdma_iocb_snk(struct sdp_opt *conn)
+static int sdp_post_rdma_iocb_snk(struct sdp_opt *conn)
 {
 	struct sdpc_iocb *iocb;
 	int result = 0;
@@ -450,9 +450,9 @@ error:
 }
 
 /*
- * _sdp_post_rdma - post a rdma based requests for a connection
+ * sdp_post_rdma - post a rdma based requests for a connection
  */
-static int _sdp_post_rdma(struct sdp_opt *conn)
+static int sdp_post_rdma(struct sdp_opt *conn)
 {
 	int result = 0;
 
@@ -470,7 +470,7 @@ static int _sdp_post_rdma(struct sdp_opt
 	if (sdp_advt_q_size(&conn->src_pend) > 0) {
 		if (!sdp_desc_q_types_size(&conn->r_src,
 					       SDP_DESC_TYPE_BUFF))
-			while (!(result = _sdp_post_rdma_iocb_src(conn))) {
+			while (!(result = sdp_post_rdma_iocb_src(conn))) {
 				/*
 				 * pass, nothing to do in loop.
 				 */
@@ -491,7 +491,7 @@ static int _sdp_post_rdma(struct sdp_opt
 			       conn->recv_max >
 			       sdp_buff_q_size(&conn->recv_pool) &&
 			       conn->rwin_max > conn->byte_strm) {
-				result = _sdp_post_rdma_buff(conn);
+				result = sdp_post_rdma_buff(conn);
 				if (result)
 					/*
 					 * No more posts allowed.
@@ -510,7 +510,7 @@ static int _sdp_post_rdma(struct sdp_opt
 		if (sdp_iocb_q_size(&conn->r_pend) > 0 &&
 		    conn->recv_mode == SDP_MODE_PIPE &&
 		    !sdp_advt_q_size(&conn->src_actv))
-			while (!(result = _sdp_post_rdma_iocb_snk(conn))) {
+			while (!(result = sdp_post_rdma_iocb_snk(conn))) {
 				/*
 				 * pass
 				 */
@@ -564,7 +564,7 @@ int sdp_recv_flush(struct sdp_opt *conn)
 		      ((s32)conn->recv_cq_size - (s32)conn->l_recv_bf));
 
 	while (counter-- > 0) {
-		result = _sdp_post_recv_buff(conn);
+		result = sdp_post_recv_buff(conn);
 		if (result)
 			/*
 			 * No more recv buffers allowed.
@@ -589,7 +589,7 @@ int sdp_recv_flush(struct sdp_opt *conn)
 	 * data flowing from the remote connection peer to the local
 	 * connection peer.
 	 */
-	result = _sdp_post_rdma(conn);
+	result = sdp_post_rdma(conn);
 	if (result < 0) {
 		sdp_dbg_warn(conn, "Error <%d> posting RDMAs.", result);
 		goto done;
@@ -632,10 +632,9 @@ done:
  */
 
 /*
- * __sdp_read_buff_iocb - read a SDP buffer into an IOCB
+ * sdp_read_buff_iocb - read a SDP buffer into an IOCB
  */
-static int _sdp_read_buff_iocb(struct sdpc_iocb *iocb,
-			       struct sdpc_buff *buff)
+static int sdp_read_buff_iocb(struct sdpc_iocb *iocb, struct sdpc_buff *buff)
 {
 	unsigned long copy = 0;
 	unsigned long offset;
@@ -665,7 +664,7 @@ static int _sdp_read_buff_iocb(struct sd
 		/*
 		 * map correct page of iocb
 		 */
-		addr = __sdp_kmap(iocb->page_array[counter]);
+		addr = sdp_kmap(iocb->page_array[counter]);
 		if (!addr)
 			break;
 
@@ -683,7 +682,7 @@ static int _sdp_read_buff_iocb(struct sd
 		offset     += copy;
 		offset     &= (~PAGE_MASK);
 		
-		__sdp_kunmap(iocb->page_array[counter++]);
+		sdp_kunmap(iocb->page_array[counter++]);
 	}
 	/*
 	 * restore tail from OOB offset.
@@ -694,10 +693,10 @@ static int _sdp_read_buff_iocb(struct sd
 }
 
 /*
- * _sdp_recv_buff_iocb_active - Ease AIO read pending pressure
+ * sdp_recv_buff_iocb_active - Ease AIO read pending pressure
  */
-static int _sdp_recv_buff_iocb_active(struct sdp_opt *conn,
-				      struct sdpc_buff *buff)
+static int sdp_recv_buff_iocb_active(struct sdp_opt *conn,
+				     struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
 	int result;
@@ -716,7 +715,7 @@ static int _sdp_recv_buff_iocb_active(st
 	/*
 	 * TODO: need to be checking OOB here.
 	 */
-	result = _sdp_read_buff_iocb(iocb, buff);
+	result = sdp_read_buff_iocb(iocb, buff);
 	if (result < 0) {
 		sdp_dbg_warn(conn, "Error <%d> data copy <%d:%u> to IOCB",
 			     result, iocb->len, 
@@ -743,10 +742,10 @@ static int _sdp_recv_buff_iocb_active(st
 }
 
 /*
- * _sdp_recv_buff_iocb_pending - Ease AIO read pending pressure
+ * sdp_recv_buff_iocb_pending - Ease AIO read pending pressure
  */
-static int _sdp_recv_buff_iocb_pending(struct sdp_opt *conn,
-				       struct sdpc_buff *buff)
+static int sdp_recv_buff_iocb_pending(struct sdp_opt *conn,
+				      struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
 	int result;
@@ -763,7 +762,7 @@ static int _sdp_recv_buff_iocb_pending(s
 	/*
 	 * TODO: need to be checking OOB here.
 	 */
-	result = _sdp_read_buff_iocb(iocb, buff);
+	result = sdp_read_buff_iocb(iocb, buff);
 	if (result < 0) {
 		sdp_dbg_warn(conn, "Error <%d> data copy <%d:%u> to IOCB",
 			     result, iocb->len, 
@@ -861,9 +860,9 @@ int sdp_recv_buff(struct sdp_opt *conn, 
 		 * IOCB.
 		 */
 		if (conn->snk_sent > 0)
-			result = _sdp_recv_buff_iocb_active(conn, buff);
+			result = sdp_recv_buff_iocb_active(conn, buff);
 		else
-			result = _sdp_recv_buff_iocb_pending(conn, buff);
+			result = sdp_recv_buff_iocb_pending(conn, buff);
 		/*
 		 * Check result. Postitive result is data left in the buffer
 		 */
@@ -899,9 +898,9 @@ done:
  */
 
 /*
- * _sdp_read_src_lookup - lookup function for cancelation
+ * sdp_read_src_lookup - lookup function for cancelation
  */
-static int _sdp_read_src_lookup(struct sdpc_desc *element, void *arg)
+static int sdp_read_src_lookup(struct sdpc_desc *element, void *arg)
 {
 	struct sdpc_iocb *iocb = (struct sdpc_iocb *) element;
 	struct kiocb *req = (struct kiocb *)arg;
@@ -913,10 +912,9 @@ static int _sdp_read_src_lookup(struct s
 }
 
 /*
- * _sdp_inet_read_cancel - cancel an IO operation
+ * sdp_inet_read_cancel - cancel an IO operation
  */
-static int _sdp_inet_read_cancel(struct kiocb *req,
-				 struct io_event *ev)
+static int sdp_inet_read_cancel(struct kiocb *req, struct io_event *ev)
 {
 	struct sock_iocb *si = kiocb_to_siocb(req);
 	struct sdp_opt   *conn;
@@ -995,7 +993,7 @@ static int _sdp_inet_read_cancel(struct 
 	 * already in flight.
 	 */
 	iocb = (struct sdpc_iocb *)sdp_desc_q_lookup(&conn->r_src,
-						     _sdp_read_src_lookup,
+						     sdp_read_src_lookup,
 						     req);
 	if (iocb) {
 		iocb->flags |= SDP_IOCB_F_CANCEL;
@@ -1045,17 +1043,17 @@ done:
 }
 
 /*
- * _sdp_inet_recv_urg_test - recv queue urgent data cleanup function
+ * sdp_inet_recv_urg_test - recv queue urgent data cleanup function
  */
-static int _sdp_inet_recv_urg_test(struct sdpc_buff *buff, void *arg)
+static int sdp_inet_recv_urg_test(struct sdpc_buff *buff, void *arg)
 {
 	return ((buff->tail == buff->head) ? 1 : 0);
 }
 
 /*
- * _sdp_inet_recv_urg_trav - recv queue urg data retreival function
+ * sdp_inet_recv_urg_trav - recv queue urg data retreival function
  */
-static int _sdp_inet_recv_urg_trav(struct sdpc_buff *buff, void *arg)
+static int sdp_inet_recv_urg_trav(struct sdpc_buff *buff, void *arg)
 {
 	u8 *value = (u8 *) arg;
 	u8 update;
@@ -1078,12 +1076,10 @@ static int _sdp_inet_recv_urg_trav(struc
 }
 
 /*
- * _sdp_inet_recv_urg - recv urgent data from the network to user space
+ * sdp_inet_recv_urg - recv urgent data from the network to user space
  */
-static int _sdp_inet_recv_urg(struct sock *sk,
-			      struct msghdr *msg,
-			      int size,
-			      int flags)
+static int sdp_inet_recv_urg(struct sock *sk, struct msghdr *msg, int size,
+			     int flags)
 {
 	struct sdp_opt *conn;
 	struct sdpc_buff *buff;
@@ -1105,7 +1101,7 @@ static int _sdp_inet_recv_urg(struct soc
 #endif
 
 	result = sdp_buff_q_trav_head(&conn->recv_pool,
-				      _sdp_inet_recv_urg_trav,
+				      sdp_inet_recv_urg_trav,
 				      (void *)&value);
 	if (result != -ERANGE) {
 		result = result ? result : -EAGAIN;
@@ -1131,7 +1127,7 @@ static int _sdp_inet_recv_urg(struct soc
 			 * if appropriate.
 			 */
 			buff = sdp_buff_q_fetch(&conn->recv_pool,
-						_sdp_inet_recv_urg_test,
+						sdp_inet_recv_urg_test,
 						(void *)0);
 			if (buff) {
 				result = sdp_buff_pool_put(buff);
@@ -1155,11 +1151,8 @@ done:
 /*
  * sdp_inet_recv - recv data from the network to user space
  */
-int sdp_inet_recv(struct kiocb  *req,
-		  struct socket *sock,
-		  struct msghdr *msg, 
-		  size_t size, 
-		  int flags)
+int sdp_inet_recv(struct kiocb  *req, struct socket *sock, struct msghdr *msg, 
+		  size_t size, int flags)
 {
 	struct sock      *sk;
 	struct sdp_opt   *conn;
@@ -1210,7 +1203,7 @@ int sdp_inet_recv(struct kiocb  *req,
 	 * process urgent data
 	 */
 	if (MSG_OOB & flags) {
-		result = _sdp_inet_recv_urg(sk, msg, size, flags);
+		result = sdp_inet_recv_urg(sk, msg, size, flags);
 		copied = (result > 0) ? result : 0;
 		result = (result > 0) ? 0 : result;
 		goto done;
@@ -1467,7 +1460,7 @@ int sdp_inet_recv(struct kiocb  *req,
 			iocb->key  = req->ki_key;
 			iocb->addr = (unsigned long)msg->msg_iov->iov_base;
       
-			req->ki_cancel = _sdp_inet_read_cancel;
+			req->ki_cancel = sdp_inet_read_cancel;
 
 			result = sdp_iocb_lock(iocb);
 			if (result < 0) {




More information about the general mailing list