summaryrefslogtreecommitdiff
path: root/drivers/misc/mic
diff options
context:
space:
mode:
authorMuhammad Falak R Wani <falakreyaz@gmail.com>2016-05-21 16:11:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 15:45:50 +0300
commitacde785e492d6ce838f50937f7547124e0837a55 (patch)
tree5ac32664829695de125adfdb63230ea46377786c /drivers/misc/mic
parentb6faae97a157a7d3d3ab7f806e85059ca075e1b5 (diff)
downloadlinux-acde785e492d6ce838f50937f7547124e0837a55.tar.xz
misc: mic: scif: use vma_pages().
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r--drivers/misc/mic/scif/scif_mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mic/scif/scif_mmap.c b/drivers/misc/mic/scif/scif_mmap.c
index 49cb8f7b4672..928211677079 100644
--- a/drivers/misc/mic/scif/scif_mmap.c
+++ b/drivers/misc/mic/scif/scif_mmap.c
@@ -552,7 +552,7 @@ static void scif_munmap(struct vm_area_struct *vma)
{
struct scif_endpt *ep;
struct vma_pvt *vmapvt = vma->vm_private_data;
- int nr_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ int nr_pages = vma_pages(vma);
s64 offset;
struct scif_rma_req req;
struct scif_window *window = NULL;
@@ -614,7 +614,7 @@ int scif_mmap(struct vm_area_struct *vma, scif_epd_t epd)
struct scif_window *window = NULL;
struct scif_endpt *ep = (struct scif_endpt *)epd;
s64 start_offset = vma->vm_pgoff << PAGE_SHIFT;
- int nr_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ int nr_pages = vma_pages(vma);
int err;
struct vma_pvt *vmapvt;