Use macro "uip" instead of "unsigned int __force *", like "vuip" in arch/alpha/include/asm/core_cia.h. Signed-off-by: Geliang Tang <geliangtang@xxxxxxx> --- drivers/staging/comedi/comedi_compat32.c | 3 +-- drivers/staging/comedi/comedi_compat32.h | 2 ++ drivers/staging/comedi/comedi_fops.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index f356386..adaef03 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -202,8 +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((unsigned int __force *)compat_ptr(temp.uptr), - &cmd->chanlist); + err |= __put_user((uip)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); diff --git a/drivers/staging/comedi/comedi_compat32.h b/drivers/staging/comedi/comedi_compat32.h index 5ce77f3..8446273 100644 --- a/drivers/staging/comedi/comedi_compat32.h +++ b/drivers/staging/comedi/comedi_compat32.h @@ -33,4 +33,6 @@ long comedi_compat_ioctl(struct file *, unsigned int cmd, unsigned long arg); #endif /* CONFIG_COMPAT */ +#define uip unsigned int __force * + #endif /* _COMEDI_COMPAT32_H */ diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 2ba9cdb..d37f4c5 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1714,7 +1714,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, dev_dbg(dev->class_dev, "test returned %d\n", ret); cmd = async->cmd; /* restore chanlist pointer before copying back */ - cmd.chanlist = (unsigned int __force *)user_chanlist; + cmd.chanlist = (uip)user_chanlist; cmd.data = NULL; if (copy_to_user(arg, &cmd, sizeof(cmd))) { dev_dbg(dev->class_dev, "fault writing cmd\n"); @@ -1800,7 +1800,7 @@ static int do_cmdtest_ioctl(struct comedi_device *dev, kfree(cmd.chanlist); /* free kernel copy of user chanlist */ /* restore chanlist pointer before copying back */ - cmd.chanlist = (unsigned int __force *)user_chanlist; + cmd.chanlist = (uip)user_chanlist; if (copy_to_user(arg, &cmd, sizeof(cmd))) { dev_dbg(dev->class_dev, "bad cmd address\n"); -- 2.3.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel