Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK).
PATCH v2 1/1 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 <[email protected]>
---
Changes in v2:
* No change.
*Compile this patch to check nothing is broken.
drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/comedi_fops.c +1 -1
@@ -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; }
Signature · 1 line
1.8.3.4