[openib-general] [PATCH][SDP][0/22] Whitespace cleanup in SDP

Roland Dreier roland at topspin.com
Tue Feb 22 15:04:10 PST 2005


OK, here's the patch.


Cast u64 values to unsigned long long inside sdp_dbg_data() to get rid
of compiler warnings on 64-bit archs when building with
INFINIBAND_SDP_DEBUG_DATA turned on.

Signed-off-by: Roland Dreier <roland at topspin.com>

Index: infiniband/ulp/sdp/sdp_write.c
===================================================================
--- infiniband/ulp/sdp/sdp_write.c	(revision 1867)
+++ infiniband/ulp/sdp/sdp_write.c	(working copy)
@@ -74,7 +74,7 @@ int sdp_event_write(struct sdp_opt *conn
 	}
 
 	sdp_dbg_data(conn, "Write complete <%llu> of <%u> bytes.",
-		     comp->wr_id, comp->byte_len);
+		     (unsigned long long) comp->wr_id, comp->byte_len);
 	/*
 	 * Four basic scenarios:
 	 *
Index: infiniband/ulp/sdp/sdp_rcvd.c
===================================================================
--- infiniband/ulp/sdp/sdp_rcvd.c	(revision 1867)
+++ infiniband/ulp/sdp/sdp_rcvd.c	(working copy)
@@ -729,7 +729,8 @@ static int _sdp_rcvd_snk_avail(struct sd
 	_sdp_msg_net_to_cpu_snkah(snkah);
 
 	sdp_dbg_data(conn, "SnkAvail received. <%d:%d:%016llx> mode <%d>",
-		     snkah->size, snkah->r_key, snkah->addr, conn->send_mode);
+		     snkah->size, snkah->r_key, (unsigned long long) snkah->addr,
+		     conn->send_mode);
 	/*
 	 * check our send mode, and make sure parameters are within reason.
 	 */
@@ -873,8 +874,8 @@ static int _sdp_rcvd_src_avail(struct sd
 	size = buff->tail - buff->data;
 
 	sdp_dbg_data(conn, "SrcAvail received. <%d:%d:%d:%016llx> mode <%d>",
-		     srcah->size, srcah->r_key, size, srcah->addr,
-		     conn->recv_mode);
+		     srcah->size, srcah->r_key, size,
+		     (unsigned long long) srcah->addr, conn->recv_mode);
 
 	if (0 < conn->snk_sent) {
 		/*
Index: infiniband/ulp/sdp/sdp_read.c
===================================================================
--- infiniband/ulp/sdp/sdp_read.c	(revision 1867)
+++ infiniband/ulp/sdp/sdp_read.c	(working copy)
@@ -142,7 +142,7 @@ int sdp_event_read(struct sdp_opt *conn,
 	}
 
 	sdp_dbg_data(conn, "Read complete <%llu> of <%u> bytes.",
-		     comp->wr_id, comp->byte_len);
+		     (unsigned long long) comp->wr_id, comp->byte_len);
 	/*
 	 * update queue depth
 	 */
Index: infiniband/ulp/sdp/sdp_send.c
===================================================================
--- infiniband/ulp/sdp/sdp_send.c	(revision 1867)
+++ infiniband/ulp/sdp/sdp_send.c	(working copy)
@@ -372,7 +372,7 @@ static int _sdp_send_data_buff_snk(struc
 	advt->post += (buff->tail - buff->data);
 
 	sdp_dbg_data(conn, "POST Write BUFF wrid <%llu> bytes <%u:%d>.",
-		     buff->wrid, (unsigned)(buff->tail - buff->data),
+		     (unsigned long long) buff->wrid, (unsigned)(buff->tail - buff->data),
 		     advt->size);
 	/*
 	 * dequeue if needed and the queue buffer
@@ -502,9 +502,8 @@ static int _sdp_send_data_iocb_snk(struc
 		advt->addr += zcopy;
 		advt->post += zcopy;
 
-		sdp_dbg_data(conn, 
-			     "POST Write IOCB wrid <%llu> bytes <%u:%d:%d>.",
-			     iocb->wrid, zcopy, iocb->len, advt->size);
+		sdp_dbg_data(conn, "POST Write IOCB wrid <%llu> bytes <%u:%d:%d>.",
+			     (unsigned long long) iocb->wrid, zcopy, iocb->len, advt->size);
 		/*
 		 * update send queue depth
 		 */
Index: infiniband/ulp/sdp/sdp_recv.c
===================================================================
--- infiniband/ulp/sdp/sdp_recv.c	(revision 1867)
+++ infiniband/ulp/sdp/sdp_recv.c	(working copy)
@@ -82,7 +82,7 @@ static int _sdp_post_recv_buff(struct sd
 	}
 
 	sdp_dbg_data(conn, "POST RECV BUFF wrid <%llu> of <%u> bytes.",
-		     buff->wrid, (unsigned)(buff->tail - buff->data));
+		     (unsigned long long) buff->wrid, (unsigned)(buff->tail - buff->data));
 	/*
 	 * post recv
 	 */
@@ -203,7 +203,7 @@ static int _sdp_post_rdma_buff(struct sd
 	}
 
 	sdp_dbg_data(conn, "POST READ BUFF wrid <%llu> of <%u> bytes.",
-		     buff->wrid, (unsigned)(buff->tail - buff->data));
+		     (unsigned long long) buff->wrid, (unsigned)(buff->tail - buff->data));
 	/*
 	 * update send queue depth
 	 */
@@ -353,7 +353,7 @@ static int _sdp_post_rdma_iocb_src(struc
 	}
 
 	sdp_dbg_data(conn, "POST READ IOCB wrid <%llu> bytes <%u:%d:%d>.",
-		 iocb->wrid, zcopy, iocb->len, advt->size);
+		     (unsigned long long) iocb->wrid, zcopy, iocb->len, advt->size);
 	/*
 	 * update send queue depth
 	 */



More information about the general mailing list