Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1404839
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] HSI: cmt_speech: use vma_pages(). |
| Date | 2016-05-21 15:20 +0200 |
| Message-ID | <rBeYW-3Xz-29@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> --- drivers/hsi/clients/cmt_speech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 95638df..b16cfa4 100644 --- a/drivers/hsi/clients/cmt_speech.c +++ b/drivers/hsi/clients/cmt_speech.c @@ -1275,7 +1275,7 @@ static int cs_char_mmap(struct file *file, struct vm_area_struct *vma) if (vma->vm_end < vma->vm_start) return -EINVAL; - if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) != 1) + if (vma_pages(vma) != 1) return -EINVAL; vma->vm_flags |= VM_IO | VM_DONTDUMP | VM_DONTEXPAND; -- 1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] HSI: cmt_speech: use vma_pages(). Muhammad Falak R Wani <falakreyaz@gmail.com> - 2016-05-21 15:20 +0200 Re: [PATCH] HSI: cmt_speech: use vma_pages(). Sebastian Reichel <sre@kernel.org> - 2016-05-30 07:20 +0200
csiph-web