From: H Hartley Sweeten Date: Fri, 5 Apr 2013 23:07:49 +0000 (-0700) Subject: staging: comedi: serial2002: fix different address space sparse warnings X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~266 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ef0e3e308f59413ba2da42717a884362bf2efc;p=pandora-kernel.git staging: comedi: serial2002: fix different address space sparse warnings The struct file_operations (*read) and (*write) operations expect the buffer to be a __user space pointer. Currently the (*write) operations in this driver cause this warning: warning: incorrect type in argument 2 (different address spaces) expected char const [noderef] * got unsigned char [usertype] *buf And the (*read) operations cause this warning: warning: incorrect type in argument 2 (different address spaces) expected char [noderef] * got unsigned char * Use __force to cast the buffer to a __user pointer to suppress the warnings. Consolidate the (*read) calls into a helper function, __tty_readb(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed