[openib-general] [PATCH][SDP][20/22] Whitespace cleanup in sdp_sent.c

Tom Duffy Tom.Duffy at Sun.COM
Fri Feb 18 16:47:47 PST 2005


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

Index: linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_sent.c
===================================================================
--- linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_sent.c	(revision 1836)
+++ linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_sent.c	(working copy)
@@ -70,7 +70,6 @@ static int _sdp_sent_disconnect(struct s
 		 */
 		result = sdp_cm_disconnect(conn);
 		if (0 > result) {
-
 			sdp_dbg_warn(conn, "Error <%d> posting CM disconnect",
 				     result);
 			goto error;
@@ -89,7 +88,6 @@ static int _sdp_sent_disconnect(struct s
 		 */
 		result = sdp_wall_recv_closing(conn);
 		if (0 > result) {
-
 			sdp_dbg_warn(conn, "Error <%d> closing connection.",
 				     result);
 			goto error;
@@ -102,14 +100,11 @@ static int _sdp_sent_disconnect(struct s
 		 * if the remote DREQ was already received, but unprocessed, do
 		 * not treat it as an error
 		 */
-		if (0 > result) {
-			
+		if (0 > result)
 			sdp_dbg_warn(conn, "Error <%d> CM disconnect", result);
-		}
 
 		break;
 	default:
-
 		sdp_warn("Disconnect sent, unexpected state. <%d> <%04x:%04d>",
 			 conn->hashent, conn->istate, conn->state);
 		result = -EFAULT;
@@ -137,10 +132,8 @@ static int _sdp_sent_abort(struct sdp_op
 	SDP_CONN_ST_SET(conn, SDP_CONN_ST_ERROR_STRM);
 
 	result = sdp_cm_disconnect(conn);
-	if (0 > result) {
-
+	if (0 > result)
 		sdp_dbg_warn(conn, "Error <%d> CM disconnect", result);
-	}
 
 	return result;
 } /* _sdp_sent_abort */
@@ -391,7 +384,6 @@ int sdp_event_send(struct sdp_opt *conn,
 	 * error handling
 	 */
 	if (IB_WC_SUCCESS != comp->status) {
-
 		switch (comp->status) {
 		case IB_WC_WR_FLUSH_ERR:
 			/*
@@ -405,7 +397,6 @@ int sdp_event_send(struct sdp_opt *conn,
 			result = 0;
 			break;
 		default:
-
 			sdp_dbg_warn(conn, "Unhandled SEND error status <%d>.",
 				     comp->status);
 			result = -EIO;
@@ -421,7 +412,6 @@ int sdp_event_send(struct sdp_opt *conn,
 		 * sanity checks
 		 */
 		if (NULL == buff->bsdh_hdr) {
-
 			sdp_dbg_warn(conn, "Send header is missing?!");
 			result = -ENODATA;
 			goto drop;
@@ -458,17 +448,13 @@ int sdp_event_send(struct sdp_opt *conn,
 		 * data fast path we collapse the next level dispatch function.
 		 * For all other buffers we go the slow path.
 		 */
-		if (SDP_MID_DATA == buff->bsdh_hdr->mid) {
-
+		if (SDP_MID_DATA == buff->bsdh_hdr->mid)
 			conn->send_qud -= buff->data_size;
-		}
 		else {
-
 			offset = buff->bsdh_hdr->mid & 0x1F;
 
 			if (!(offset < SDP_MSG_EVENT_TABLE_SIZE) ||
 			    NULL == send_event_funcs[offset]) {
-
 				sdp_dbg_warn(conn, 
 					     "Send complete unknown MID <%d>",
 					     buff->bsdh_hdr->mid);
@@ -481,7 +467,6 @@ int sdp_event_send(struct sdp_opt *conn,
 			dispatch_func = send_event_funcs[offset];
 			result = dispatch_func(conn, buff);
 			if (0 > result) {
-
 				sdp_dbg_warn(conn, "Sent dispatch error. <%d>",
 					     result);
 				goto drop;
@@ -494,10 +479,8 @@ int sdp_event_send(struct sdp_opt *conn,
 		 */
 		conn->s_wq_size--;
 
-		if (0 < SDP_BUFF_F_GET_UNSIG(buff)) {
-
+		if (0 < SDP_BUFF_F_GET_UNSIG(buff))
 			conn->send_usig--;
-		}
 		/*
 		 * create a link of buffers which will be returned to
 		 * the free pool in one group.
@@ -508,17 +491,14 @@ int sdp_event_send(struct sdp_opt *conn,
 		head = buff;
 		free_count++;
 
-		if (comp->wr_id == current_wrid) {
-
+		if (comp->wr_id == current_wrid)
 			break;
-		}
 	}
 
 	result = sdp_buff_pool_chain_put(head, free_count);
 	SDP_EXPECT(!(0 > result));
 
 	if (!(0 < free_count) || 0 > conn->send_usig) {
-
 		sdp_dbg_warn(conn, 
 			     "Send processing mismatch. <%llu:%llu:%d:%d>",
 			     (unsigned long long)comp->wr_id,
@@ -532,7 +512,6 @@ int sdp_event_send(struct sdp_opt *conn,
 	 */
 	result = sdp_send_flush(conn);
 	if (0 > result) {
-
 		sdp_dbg_warn(conn, "Error <%d> flushing send queue.", result);
 		goto done;
 	}




More information about the general mailing list