staging: gasket: print mmap starting address as unsigned long
authorTodd Poynor <toddpoynor@google.com>
Sat, 21 Jul 2018 13:34:58 +0000 (06:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jul 2018 11:56:46 +0000 (13:56 +0200)
Page alignment error log should print the offending value as an unsigned
long, not as a kernel pointer.

Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_core.c

index 2cd232230845c5b54b172fc457034792f3d7a2ea..11ab04985449381bdc565783c721798b2a2b9678 100644 (file)
@@ -1596,8 +1596,8 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
 
        if (vma->vm_start & ~PAGE_MASK) {
                gasket_log_error(
-                       gasket_dev, "Base address not page-aligned: 0x%p\n",
-                       (void *)vma->vm_start);
+                       gasket_dev, "Base address not page-aligned: 0x%lx\n",
+                       vma->vm_start);
                trace_gasket_mmap_exit(-EINVAL);
                return -EINVAL;
        }