Commit fd5d76ab authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

staging: gasket: gasket_mmap use PAGE_MASK

gasket_mmap use PAGE_MASK, instead of performing math on PAGE_SIZE, for
simplicity and clarity.
Reported-by: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarSimon Que <sque@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b184cc8
...@@ -1591,7 +1591,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -1591,7 +1591,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
} }
driver_desc = gasket_dev->internal_desc->driver_desc; driver_desc = gasket_dev->internal_desc->driver_desc;
if (vma->vm_start & (PAGE_SIZE - 1)) { if (vma->vm_start & ~PAGE_MASK) {
gasket_log_error( gasket_log_error(
gasket_dev, "Base address not page-aligned: 0x%p\n", gasket_dev, "Base address not page-aligned: 0x%p\n",
(void *)vma->vm_start); (void *)vma->vm_start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment