aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/amso1100/c2_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rdma/amso1100/c2_alloc.c')
-rw-r--r--drivers/staging/rdma/amso1100/c2_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/amso1100/c2_alloc.c b/drivers/staging/rdma/amso1100/c2_alloc.c
index 78d247ec6961..039872dfabbc 100644
--- a/drivers/staging/rdma/amso1100/c2_alloc.c
+++ b/drivers/staging/rdma/amso1100/c2_alloc.c
@@ -131,7 +131,7 @@ void c2_free_mqsp(__be16 *mqsp)
*mqsp = (__force __be16) head->head;
/* Compute the shared_ptr index */
- idx = ((unsigned long) mqsp & ~PAGE_MASK) >> 1;
+ idx = (offset_in_page(mqsp)) >> 1;
idx -= (unsigned long) &(((struct sp_chunk *) 0)->shared_ptr[0]) >> 1;
/* Point this index at the head */