]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
metag/usercopy: Simplify rapf loop fixup corner case
authorJames Hogan <james.hogan@imgtec.com>
Tue, 4 Apr 2017 10:42:35 +0000 (11:42 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Wed, 5 Apr 2017 14:25:08 +0000 (15:25 +0100)
commitfc1b759ae4e0f636c56ca8410207a8a36630a96e
tree444b2d54fddfa72267859923ded830252ef7544b
parent049520dcb3966ee0471f2757ca3f5f5e317f33cd
metag/usercopy: Simplify rapf loop fixup corner case

The final fixup in the rapf loops must handle a corner case due to the
intermediate decrementing of the destination pointer before writing the
last element to it again and re-incrementing it. This decrement (and the
associated increment in the fixup code) can be easily avoided by using
SETL/SETD with an offset of -8/-4.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
arch/metag/lib/usercopy.c