]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/uaccess: Simplify unsafe_put_user() implementation
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 8 Feb 2021 05:57:01 +0000 (16:57 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:33:16 +0000 (23:33 +1100)
commitde4ffc653f370e56d74994ae5247e39a100b4ff7
treeac85c8355d185a7ea13ea957a71be2a646e65f05
parentf30520c64f290589e91461d7326b497c23e7f5fd
powerpc/uaccess: Simplify unsafe_put_user() implementation

Currently unsafe_put_user() expands to __put_user_goto(), which
expands to __put_user_nocheck_goto().

There are no other uses of __put_user_nocheck_goto(), and although
there are some other uses of __put_user_goto() those could just use
unsafe_put_user().

Every layer of indirection introduces the possibility that some code
is calling that layer, and makes keeping track of the required
semantics at each point more complicated.

So drop __put_user_goto(), and rename __put_user_nocheck_goto() to
__unsafe_put_user_goto(). The "nocheck" is implied by "unsafe".

Replace the few uses of __put_user_goto() with unsafe_put_user().

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210208135717.2618798-1-mpe@ellerman.id.au
arch/powerpc/include/asm/uaccess.h