mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
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: Guenter Roeck <groeck@chromium.org> Signed-off-by: Simon Que <sque@chromium.org> Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0b184cc865
commit
fd5d76ab69
@@ -1591,7 +1591,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
}
|
||||
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_dev, "Base address not page-aligned: 0x%p\n",
|
||||
(void *)vma->vm_start);
|
||||
|
||||
Reference in New Issue
Block a user