aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyam Saini <mayhs11saini@gmail.com>2016-10-09 20:17:36 -0400
committerMatt Turner <mattst88@gmail.com>2017-09-04 15:04:32 -0400
commit236d62b03a95d70ffe04fbc4cd55a64136f2ee44 (patch)
tree4f1ac60c235308b195570a6c02ff3797e9f3263f
parent03e1f04414b6e8ad9dd20081c3f8304e81f28f47 (diff)
alpha: kernel: Use vma_pages()
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--arch/alpha/kernel/pci-sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c
index 92c0d460815b..652449ebed52 100644
--- a/arch/alpha/kernel/pci-sysfs.c
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -38,7 +38,7 @@ static int __pci_mmap_fits(struct pci_dev *pdev, int num,
38 unsigned long nr, start, size; 38 unsigned long nr, start, size;
39 int shift = sparse ? 5 : 0; 39 int shift = sparse ? 5 : 0;
40 40
41 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 41 nr = vma_pages(vma);
42 start = vma->vm_pgoff; 42 start = vma->vm_pgoff;
43 size = ((pci_resource_len(pdev, num) - 1) >> (PAGE_SHIFT - shift)) + 1; 43 size = ((pci_resource_len(pdev, num) - 1) >> (PAGE_SHIFT - shift)) + 1;
44 44
@@ -255,7 +255,7 @@ static int __legacy_mmap_fits(struct pci_controller *hose,
255{ 255{
256 unsigned long nr, start, size; 256 unsigned long nr, start, size;
257 257
258 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 258 nr = vma_pages(vma);
259 start = vma->vm_pgoff; 259 start = vma->vm_pgoff;
260 size = ((res_size - 1) >> PAGE_SHIFT) + 1; 260 size = ((res_size - 1) >> PAGE_SHIFT) + 1;
261 261