• Will Deacon's avatar
    parisc: uaccess: fix compiler warnings caused by __put_user casting · 0f28b628
    Will Deacon authored
    When targetting 32-bit processors, __put_user emits a pair of stw
    instructions for the 8-byte case. If the type of __val is a pointer, the
    marshalling code casts it to the wider integer type of u64, resulting
    in the following compiler warnings:
    
      kernel/signal.c: In function 'copy_siginfo_to_user':
      kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      [...]
    
    This patch fixes the warnings by removing the marshalling code and using
    the correct output modifiers in the __put_{user,kernel}_asm64 macros
    so that GCC will allocate the right registers without the need to
    extract the two words explicitly.
    
    Cc: Helge Deller <deller@gmx.de>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    0f28b628
uaccess.h 8.98 KB