Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: comedi: fix cast warning in comedi_compat32.c

This patch fixes the following sparse warning:

drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes
address space of expression

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Geliang Tang and committed by
Greg Kroah-Hartman
0f73490e 58a06a2a

+2 -1
+2 -1
drivers/staging/comedi/comedi_compat32.c
··· 202 202 err |= __get_user(temp.uint, &cmd32->stop_arg); 203 203 err |= __put_user(temp.uint, &cmd->stop_arg); 204 204 err |= __get_user(temp.uptr, &cmd32->chanlist); 205 - err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist); 205 + err |= __put_user((unsigned int __force *)compat_ptr(temp.uptr), 206 + &cmd->chanlist); 206 207 err |= __get_user(temp.uint, &cmd32->chanlist_len); 207 208 err |= __put_user(temp.uint, &cmd->chanlist_len); 208 209 err |= __get_user(temp.uptr, &cmd32->data);