Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux-2.6-microblaze.git] / drivers / staging / rdma / hfi1 / file_ops.c
index e460261..8396dc5 100644 (file)
@@ -503,8 +503,7 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma)
                 * Map only the amount allocated to the context, not the
                 * entire available context's PIO space.
                 */
-               memlen = ALIGN(uctxt->sc->credits * PIO_BLOCK_SIZE,
-                              PAGE_SIZE);
+               memlen = PAGE_ALIGN(uctxt->sc->credits * PIO_BLOCK_SIZE);
                flags &= ~VM_MAYREAD;
                flags |= VM_DONTCOPY | VM_DONTEXPAND;
                vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
@@ -654,7 +653,7 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma)
                        goto done;
                }
                memaddr = (u64)cq->comps;
-               memlen = ALIGN(sizeof(*cq->comps) * cq->nentries, PAGE_SIZE);
+               memlen = PAGE_ALIGN(sizeof(*cq->comps) * cq->nentries);
                flags |= VM_IO | VM_DONTEXPAND;
                vmf = 1;
                break;