]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: cosmetics
authorEldad Zinger <eldadz@mellanox.co.il>
Sun, 24 Oct 2010 08:50:08 +0000 (10:50 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:31 +0000 (05:05 -0700)
Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_main.c
drivers/infiniband/ulp/sdp/sdp_rx.c
drivers/infiniband/ulp/sdp/sdp_tx.c

index aecefb705affe511d3a34b0a10bba1380079577b..41cbebd6b0cf164eeb266507ee9923976c74a1b5 100644 (file)
@@ -486,7 +486,7 @@ static inline int sdp_chk_sa_cancel(struct sdp_sock *ssk, struct rx_srcavail_sta
 
 static inline struct sdp_sock *sdp_sk(const struct sock *sk)
 {
-               return (struct sdp_sock *)sk;
+       return (struct sdp_sock *)sk;
 }
 
 #ifdef SDP_SOCK_HISTORY
index 827586d3514e709a59ac35fa86b461d1541b0417..32ff3f6572e06f3b64ca5cfac1b05860c4809016 100644 (file)
@@ -1734,8 +1734,7 @@ static inline int sdp_bcopy_get(struct sock *sk, struct sk_buff *skb,
 
                /* Update the skb. */
                if (merge) {
-                       skb_shinfo(skb)->frags[i - 1].size +=
-                                                       copy;
+                       skb_shinfo(skb)->frags[i - 1].size += copy;
                } else {
                        skb_fill_page_desc(skb, i, page, off, copy);
                        if (TCP_PAGE(sk)) {
@@ -1927,7 +1926,9 @@ static int sdp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
        int err, copied;
        long timeo;
        struct bzcopy_state *bz = NULL;
-       int zcopy_thresh = -1 != ssk->zcopy_thresh ? ssk->zcopy_thresh : sdp_zcopy_thresh;
+       int zcopy_thresh =
+               -1 != ssk->zcopy_thresh ? ssk->zcopy_thresh : sdp_zcopy_thresh;
+
        SDPSTATS_COUNTER_INC(sendmsg);
 
        lock_sock(sk);
index 1c856c5adbe53923755cbf42f0f327d3e8acaac8..b9c54d1643b5e38b83ce67a1848924025a87e41d 100644 (file)
@@ -280,13 +280,7 @@ static inline int sdp_post_recvs_needed(struct sdp_sock *ssk)
        /* Bytes waiting in socket RX queue */
        bytes_in_process += rcv_nxt(ssk) - ssk->copied_seq;
 
-       if (bytes_in_process >= max_bytes) {
-               sdp_prf(sk, NULL, "bytes_in_process: 0x%lx > max_bytes: 0x%lx",
-                               bytes_in_process, max_bytes);
-               return 0;
-       }
-
-       return 1;
+       return bytes_in_process < max_bytes;
 }
 
 static inline void sdp_post_recvs(struct sdp_sock *ssk)
index 02210ac164a6fea17a3f5283c9df9985412aae49..ae0791fefa5a92e686e5cfac73e3a0d5bb4ecde0 100644 (file)
@@ -236,7 +236,7 @@ static inline void sdp_process_tx_wc(struct sdp_sock *ssk, struct ib_wc *wc)
        if (likely(!wc->status) || wc->status == IB_WC_WR_FLUSH_ERR)
                return;
 
-       sdp_dbg_data(sk, "Send completion with error. wr_id 0x%x Status %d\n", 
+       sdp_dbg_data(sk, "Send completion with error. wr_id 0x%llx Status %d\n", 
                        wc->wr_id, wc->status);
 
        sdp_set_error(sk, -ECONNRESET);