From: Sandhya Bankar Date: Sun, 6 Mar 2016 07:05:29 +0000 (+0530) Subject: Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). X-Git-Tag: v4.6-rc1~103^2~235 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44b8c793fc0d63060c6c87f0af4f9b367e2ec4fc;p=platform%2Fkernel%2Flinux-exynos.git Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index d1cf6a1..7c7b477 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2224,7 +2224,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma) retval = -EFAULT; goto done; } - if (size & (~PAGE_MASK)) { + if (offset_in_page(size)) { retval = -EFAULT; goto done; }