From: Ian Abbott Date: Tue, 18 Sep 2012 18:46:57 +0000 (+0100) Subject: staging: comedi: fix sparse warning in do_devconfig_ioctl() X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~75^2~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc881f294eb957bded69b5e7f2f72831e2d00ac4;p=pandora-kernel.git staging: comedi: fix sparse warning in do_devconfig_ioctl() For the COMEDI_DEVCONFIG ioctl, the user application may embed a pointer to firmware data within a designated element (or two elements for 64-bit pointers) of the `options[]` array in the `struct comedi_devconfig`. `do_devconfig_ioctl()` calls `comedi_aux_data()` to extract the pointer value. It needs to be treated as a `__user` pointer so the firmware data can be copied into kernel memory, so cast the result of `comedi_aux_data()` to avoid a "sparse" warning. This is not ideal but `comedi_aux_data()` is called elsewhere in a wholly kernel memory context so we can't just change its return type to include the `__user` tag. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed