From 44b8c793fc0d63060c6c87f0af4f9b367e2ec4fc Mon Sep 17 00:00:00 2001 From: Sandhya Bankar Date: Sun, 6 Mar 2016 12:35:29 +0530 Subject: [PATCH] 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 --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index d1cf6a1c92a4..7c7b477b0f28 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; } -- 2.39.5