From: Steven Rostedt Date: Fri, 3 Jan 2014 21:45:00 +0000 (-0500) Subject: x86, sparse: Do not force removal of __user when calling copy_to/from_user_nocheck() X-Git-Tag: v3.2.81~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e87888458d3d47606e14befebc35b8821b15a50;p=pandora-kernel.git x86, sparse: Do not force removal of __user when calling copy_to/from_user_nocheck() commit df90ca969035d3f6c95044e272f75bf417b14245 upstream. Commit ff47ab4ff3cdd "x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic" added a "_nocheck" call in between the copy_to/from_user() and copy_user_generic(). As both the normal and nocheck versions of theses calls use the proper __user annotation, a typecast to remove it should not be added. This causes sparse to spin out the following warnings: arch/x86/include/asm/uaccess_64.h:207:47: warning: incorrect type in argument 2 (different address spaces) arch/x86/include/asm/uaccess_64.h:207:47: expected void const [noderef] *src arch/x86/include/asm/uaccess_64.h:207:47: got void const * arch/x86/include/asm/uaccess_64.h:207:47: warning: incorrect type in argument 2 (different address spaces) arch/x86/include/asm/uaccess_64.h:207:47: expected void const [noderef] *src arch/x86/include/asm/uaccess_64.h:207:47: got void const * arch/x86/include/asm/uaccess_64.h:207:47: warning: incorrect type in argument 2 (different address spaces) arch/x86/include/asm/uaccess_64.h:207:47: expected void const [noderef] *src arch/x86/include/asm/uaccess_64.h:207:47: got void const * arch/x86/include/asm/uaccess_64.h:207:47: warning: incorrect type in argument 2 (different address spaces) arch/x86/include/asm/uaccess_64.h:207:47: expected void const [noderef] *src arch/x86/include/asm/uaccess_64.h:207:47: got void const * Cc: Andi Kleen Signed-off-by: Steven Rostedt Link: http://lkml.kernel.org/r/20140103164500.5f6478f5@gandalf.local.home Signed-off-by: H. Peter Anvin Signed-off-by: Ben Hutchings Cc: Jaccon Bastiaansen Cc: Thomas Gleixner Cc: mingo@redhat.com Cc: Peter Zijlstra Cc: h.zuidam@computer.org --- Reading git-diff-tree failed