diff options
author | Geliang Tang <geliangtang@163.com> | 2015-06-22 23:33:42 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-14 18:21:15 -0700 |
commit | 0f73490e20261dbf543744bb3dc1ae6d6af0d80f (patch) | |
tree | 5dca3229d3c328b1b57c526a1256825fed541823 | |
parent | 58a06a2a64930ad11cc398b0b00ae9817b9a821a (diff) |
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>
-rw-r--r-- | drivers/staging/comedi/comedi_compat32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index 25848244c4b1..f356386d833a 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -202,7 +202,8 @@ static int get_compat_cmd(struct comedi_cmd __user *cmd, err |= __get_user(temp.uint, &cmd32->stop_arg); err |= __put_user(temp.uint, &cmd->stop_arg); err |= __get_user(temp.uptr, &cmd32->chanlist); - err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist); + err |= __put_user((unsigned int __force *)compat_ptr(temp.uptr), + &cmd->chanlist); err |= __get_user(temp.uint, &cmd32->chanlist_len); err |= __put_user(temp.uint, &cmd->chanlist_len); err |= __get_user(temp.uptr, &cmd32->data); |