parisc: uaccess: fix compiler warnings caused by __put_user casting
authorWill Deacon <will.deacon@arm.com>
Mon, 22 Apr 2013 12:53:43 +0000 (12:53 +0000)
committerHelge Deller <deller@gmx.de>
Thu, 25 Apr 2013 20:36:42 +0000 (22:36 +0200)
commit0f28b62890097cb8732581a80f0a47fd7649df7d
treec14dbb935561f40381a3d3a3502c4c83dc5caf06
parent87be2f88b24ad1f206a5c87529ff406e96c95a12
parisc: uaccess: fix compiler warnings caused by __put_user casting

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: Will Deacon <will.deacon@arm.com>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/uaccess.h