lkml.org 
[lkml]   [2008]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 01/15] m68k: Convert access_ok() to an inline function
    From: Geert Uytterhoeven <geert@linux-m68k.org>

    Convert access_ok() from a macro to an inline function, so the compiler no
    longer complains about unused variables:

    fs/read_write.c: In function 'rw_copy_check_uvector':
    fs/read_write.c:556: warning: unused variable 'buf'

    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    ---
    include/asm-m68k/uaccess.h | 6 +++++-
    1 file changed, 5 insertions(+), 1 deletion(-)
    --- a/include/asm-m68k/uaccess.h
    +++ b/include/asm-m68k/uaccess.h
    @@ -14,7 +14,11 @@
    #define VERIFY_WRITE 1

    /* We let the MMU do all checking */
    -#define access_ok(type,addr,size) 1
    +static inline int access_ok(int type, const void __user *addr,
    + unsigned long size)
    +{
    + return 1;
    +}

    /*
    * The exception table consists of pairs of addresses: the first is the
    --
    Gr{oetje,eeting}s,
    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But
    when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds



    \
     
     \ /
      Last update: 2008-04-24 20:39    [from the cache]
    ©2003-2011 Jasper Spaans