lkml.org 
[lkml]   [2018]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/14] staging: gasket: print mmap starting address as unsigned long
    Date
    From: Todd Poynor <toddpoynor@google.com>

    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>
    ---
    drivers/staging/gasket/gasket_core.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
    index 2cd232230845c..11ab049854493 100644
    --- a/drivers/staging/gasket/gasket_core.c
    +++ b/drivers/staging/gasket/gasket_core.c
    @@ -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;
    }
    --
    2.18.0.233.g985f88cf7e-goog
    \
     
     \ /
      Last update: 2018-07-21 15:01    [W:2.845 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site