Messages in this thread | | | Date | Thu, 27 May 2004 12:01:07 -0700 | From | Andrew Morton <> | Subject | Re: [2.6.7-rc1-mm1] lp int copy_to_user replaced |
| |
FabF <fabian.frederick@skynet.be> wrote: > > On Thu, 2004-05-27 at 20:01, viro@parcelfarce.linux.theplanet.co.uk > wrote: > > On Thu, May 27, 2004 at 07:32:08PM +0200, FabF wrote: > > > Andrew, > > > > > > Here's a patch to have standard __put_user for integer transfers in lp > > > driver.Is it correct ? > > > > What the hell for? copy_to_user()/copy_from_user() is perfectly OK here. > > > And why the hell use generic functions when we have neat small type > exchange macros ?
copy_*_user() has special-case code to handle 1, 2 and 4-byte copies, so your patch should make no difference on x86. Other architectures do not have that optimisation.
So the patch is a tiny optimisation for some architectures. However, it's of very small benefit - we could make a million such changes. Would prefer more substantial things at this time, please. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |