OSDN Git Service

powerpc/signal_32: Simplify loop in PPC64 save_general_regs()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 7 Jul 2020 12:33:36 +0000 (12:33 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jul 2020 02:04:40 +0000 (12:04 +1000)
commit020c4831e01264f8b62af6ca9e669b7c51881a56
treef48200d6626ecb0843fa298e7115124512926d7b
parent667e3c413ecf20371692fd2dc37e06dc14d0b140
powerpc/signal_32: Simplify loop in PPC64 save_general_regs()

save_general_regs() which does special handling when i == PT_SOFTE.

Rewrite it to minimise the specific part, especially the __put_user()
and associated error handling is the same so make it common.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Use a regular if rather than ternary operator]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/47a38df46cae5a5a88a558a64d71f75e9c4d9950.1594125164.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/signal_32.c