From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Ian Campbell <icampbell@arcom.com>,
Wim Van Sebroeck <wim@iguana.be>,
linux-kernel@vger.kernel.org
Subject: Re: [WATCHDOG] sa1100_wdt.c sparse cleanups
Date: Sat, 5 Nov 2005 17:24:20 +0000 [thread overview]
Message-ID: <20051105172420.GC12228@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20051105145134.GL7992@ftp.linux.org.uk>
On Sat, Nov 05, 2005 at 02:51:34PM +0000, Al Viro wrote:
> 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 *.
That works for copy_to_user, but not for put_user() where the type of
the pointer matters.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2005-11-05 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-02 8:56 [WATCHDOG] sa1100_wdt.c sparse cleanups Ian Campbell
2005-11-05 10:10 ` Russell King
2005-11-05 14:51 ` Al Viro
2005-11-05 17:24 ` Russell King [this message]
2005-11-07 10:21 ` Ian Campbell
2006-01-17 19:04 ` Wim Van Sebroeck
2006-01-18 8:45 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051105172420.GC12228@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=icampbell@arcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.