From: H Hartley Sweeten Date: Tue, 18 Sep 2012 18:41:04 +0000 (-0700) Subject: staging: comedi: comedi.h: remove __user tag from chanlist X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~75^2~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9be56c6432633b706ab4bb961997f1d851b39535;p=pandora-kernel.git staging: comedi: comedi.h: remove __user tag from chanlist The 'chanlist' is passed to the kernel from user space with the COMEDI_CMD and COMEDI_CMDTEST ioctls. The do_cmd_ioctl() and do_cmdtest_ioctl() functions in comedi_fops.c copy this data to/from user space to kernel space correctly. Unfortunately, this data is copied back into a struct comedi_cmd so when the cmd is passed down to the drivers they still see the pointer as __user data. This results is a number of sparse errors such as: warning: dereference of noderef expression warning: incorrect type in argument 2 (different address spaces) expected void const * got unsigned int [noderef] *chanlist warning: incorrect type in argument 3 (different address spaces) expected unsigned int *chanlist got unsigned int [noderef] *chanlist warning: incorrect type in assignment (different address spaces) expected unsigned int *ai_chanlist got unsigned int [noderef] *chanlist The two functions in comedi_fops are the only ones that need the __user tag. Remove the tag so that all the drivers see the chanlist pointer in the correct address space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Acked-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed