public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Steve Wise <swise@opengridcomputing•com>
To: rdreier@cisco•com
Cc: general@lists•openfabrics.org, randy.dunlap@oracle•com,
	linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: [PATCH 2.6.30] RDMA/cxgb3: remove modulo math from build_rdma_recv().
Date: Wed, 11 Feb 2009 16:29:15 -0600	[thread overview]
Message-ID: <20090211222915.19520.22647.stgit@dell3.ogc.int> (raw)

From: Steve Wise <swise@opengridcomputing•com>

- remove modulo usage

Signed-off-by: Steve Wise <swise@opengridcomputing•com>
---

 drivers/infiniband/hw/cxgb3/iwch_qp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index c2b3cf7..bf549ed 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -263,8 +263,8 @@ static int build_rdma_recv(struct iwch_qp *qhp, union t3_wr *wqe,
 		wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
 
 		/* to in the WQE == the offset into the page */
-		wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) %
-				(1UL << (12 + page_size[i])));
+		wqe->recv.sgl[i].to = cpu_to_be64(((u32)wr->sg_list[i].addr) &
+				((1UL << (12 + page_size[i]) - 1)));
 
 		/* pbl_addr is the adapters address in the PBL */
 		wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]);

             reply	other threads:[~2009-02-11 22:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 22:29 Steve Wise [this message]
2009-02-11 23:00 ` [PATCH 2.6.30] RDMA/cxgb3: remove modulo math from build_rdma_recv() David Miller
2009-02-13  5:43 ` Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090211222915.19520.22647.stgit@dell3.ogc.int \
    --to=swise@opengridcomputing$(echo .)com \
    --cc=general@lists$(echo .)openfabrics.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=randy.dunlap@oracle$(echo .)com \
    --cc=rdreier@cisco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox