linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: comedi: fix sparse warning in comedi_compat32.c
@ 2015-06-20 16:49 Geliang Tang
  2015-06-20 10:38 ` Sudip Mukherjee
  0 siblings, 1 reply; 8+ messages in thread
From: Geliang Tang @ 2015-06-20 16:49 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh; +Cc: devel, linux-kernel, Geliang Tang

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>
---
 drivers/staging/comedi/comedi_compat32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c
index 2584824..29a10fe4 100644
--- a/drivers/staging/comedi/comedi_compat32.c
+++ b/drivers/staging/comedi/comedi_compat32.c
@@ -202,7 +202,7 @@ 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);
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-22 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 16:49 [PATCH] staging: comedi: fix sparse warning in comedi_compat32.c Geliang Tang
2015-06-20 10:38 ` Sudip Mukherjee
2015-06-20 14:38   ` Geliang Tang
2015-06-20 14:38     ` [PATCH v2] staging: comedi: fix cast " Geliang Tang
2015-06-22  9:43       ` Ian Abbott
2015-06-22 15:33         ` Geliang Tang
2015-06-22 15:33           ` [PATCH v3] " Geliang Tang
2015-06-22 16:08             ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).