diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-19 20:49:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-21 08:50:35 +0200 |
commit | fd5d76ab69a565ebcab94f11f185ea3dc5588249 (patch) | |
tree | 4a42fd3335e7b95ca230d8ee7183aef55958f737 /drivers/staging/gasket/gasket_core.c | |
parent | 0b184cc86542cf6938e82c61b0951e799ceceb9b (diff) |
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>
Diffstat (limited to 'drivers/staging/gasket/gasket_core.c')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 3cf918f9d260..ae5febec8844 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -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); |