From: Eldad Zinger Date: Sun, 24 Oct 2010 08:50:08 +0000 (+0200) Subject: sdp: cosmetics X-Git-Tag: v4.1.12-92~264^2~5^2~74 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2fad2524448d20076bae64a2e5fcab0589f2519f;p=users%2Fjedix%2Flinux-maple.git sdp: cosmetics Signed-off-by: Eldad Zinger --- diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h index aecefb705aff..41cbebd6b0cf 100644 --- a/drivers/infiniband/ulp/sdp/sdp.h +++ b/drivers/infiniband/ulp/sdp/sdp.h @@ -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 diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index 827586d3514e..32ff3f6572e0 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -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); diff --git a/drivers/infiniband/ulp/sdp/sdp_rx.c b/drivers/infiniband/ulp/sdp/sdp_rx.c index 1c856c5adbe5..b9c54d1643b5 100644 --- a/drivers/infiniband/ulp/sdp/sdp_rx.c +++ b/drivers/infiniband/ulp/sdp/sdp_rx.c @@ -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) diff --git a/drivers/infiniband/ulp/sdp/sdp_tx.c b/drivers/infiniband/ulp/sdp/sdp_tx.c index 02210ac164a6..ae0791fefa5a 100644 --- a/drivers/infiniband/ulp/sdp/sdp_tx.c +++ b/drivers/infiniband/ulp/sdp/sdp_tx.c @@ -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);