summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedi.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-18 11:41:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-19 09:36:44 +0100
commit9be56c6432633b706ab4bb961997f1d851b39535 (patch)
treeee759b84fdd91496ff9a8051c227ae3339fc27ec /drivers/staging/comedi/comedi.h
parent25b73c783dd87de66383ea16606a8c4f8ebb1e0a (diff)
downloadlinux-3.10-9be56c6432633b706ab4bb961997f1d851b39535.tar.gz
linux-3.10-9be56c6432633b706ab4bb961997f1d851b39535.tar.bz2
linux-3.10-9be56c6432633b706ab4bb961997f1d851b39535.zip
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 *<noident> got unsigned int [noderef] <asn:1>*chanlist warning: incorrect type in argument 3 (different address spaces) expected unsigned int *chanlist got unsigned int [noderef] <asn:1>*chanlist warning: incorrect type in assignment (different address spaces) expected unsigned int *ai_chanlist got unsigned int [noderef] <asn:1>*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 <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi.h')
-rw-r--r--drivers/staging/comedi/comedi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index 76cdb2c8bb7..133f013e0f6 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -365,7 +365,7 @@ struct comedi_cmd {
unsigned int stop_src;
unsigned int stop_arg;
- unsigned int __user *chanlist; /* channel/range list */
+ unsigned int *chanlist; /* channel/range list */
unsigned int chanlist_len;
short __user *data; /* data list, size depends on subd flags */