Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 25 Sep 2019 11:13:18 -0700 | Subject | Re: [PATCH v1 1/4] lib: introduce copy_struct_from_user() helper |
| |
On Wed, Sep 25, 2019 at 11:04 AM Al Viro <viro@zeniv.linux.org.uk> wrote: > > IMO it's better to lift reading the first word out of the loop, like this: > ... > Do you see any problems with that variant?
That looks fine to me too.
It's a bit harder for humans to read because of how it reads the word from user space one iteration early, but from a code generation standpoint it probably is better.
So slightly subtler source code, and imho harder to read, but it looks correct to me.
Linus
| |