Re: [WATCHDOG] sa1100_wdt.c sparse cleanups

From: Al Viro
Date: Sat Nov 05 2005 - 09:54:29 EST


On Sat, Nov 05, 2005 at 10:10:27AM +0000, Russell King wrote:
> It's probably better to use a union with these, eg:
>
> union {
> void __user *arg;
> struct watchdog_info __user *info;
> int __user *i;
> } u;
>
> u.arg = (void __user *)arg;
>
> ...
>
> ret = copy_to_user(u.info, &ident, sizeof(ident)) ? -EFAULT : 0;

Just use void __user *.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/