RDMA/cxgb3: remove modulo math from build_rdma_recv().
Subsystems (2)
PATCH 1/1 RDMA/cxgb3: remove modulo math from build_rdma_recv().
From: Steve Wise <[email protected]>
- remove modulo usage
Signed-off-by Steve Wise <[email protected]>
---
drivers/infiniband/hw/cxgb3/iwch_qp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/cxgb3/iwch_qp.c +2 -2
@@ -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]);
From: Steve Wise <[email protected]>
Date: Wed, 11 Feb 2009 16:29:15 -0600
Quoted 5 lines
From: Steve Wise <[email protected]>
- remove modulo usage
Signed-off-by Steve Wise <[email protected]>
Acked-by David S. Miller <[email protected]>
Roland Dreier
Appliedthanks, applied