From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: trapped io support
Date: Wed, 06 Feb 2008 21:54:52 +0000 [thread overview]
Message-ID: <20080206215452.GC13945@linux-sh.org> (raw)
In-Reply-To: <20080206151929.27099.5627.sendpatchset@clockwork.opensource.se>
On Thu, Feb 07, 2008 at 06:44:59AM +0900, Paul Mundt wrote:
> On Thu, Feb 07, 2008 at 12:19:29AM +0900, Magnus Damm wrote:
> > +static int from_user(void *dst, void *src, int cnt)
> > +{
> > + return copy_from_user(dst, src, cnt);
> > +}
> > +
> > +static int to_user(void *dst, void *src, int cnt)
> > +{
> > + return copy_to_user(dst, src, cnt);
> > +}
> > +
> > +static struct mem_access user_mem_access = {
> > + from_user,
> > + to_user,
> > +};
> > +
> The argument ordering and everything in these is exactly the same, why
> don't you use copy_to_user()/copy_from_user() in your structure here
> instead of these no-op wrappers?
>
Or rather, just make copy_to_user()/copy_from_user() inlines rather than
macros so they can be used here. If you're already certain about the
access, you can also use the __copy_to/from_user() variants which can be
dropped in here assuming you can live without the access_ok()
verification.
next prev parent reply other threads:[~2008-02-06 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 15:19 [PATCH] sh: trapped io support Magnus Damm
2008-02-06 21:44 ` Paul Mundt
2008-02-06 21:54 ` Paul Mundt [this message]
2008-02-07 5:17 ` Magnus Damm
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=20080206215452.GC13945@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox