]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/code-patching: Reorganise do_patch_instruction() to ease error handling
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 2 Dec 2021 12:00:21 +0000 (13:00 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Dec 2021 11:35:24 +0000 (22:35 +1100)
commit4b774bf71128bad5747cdd1334011b7f5269cdd0
tree9b7a7d252f58325ace97f3783bdc8cd56898f4fe
parent50457755dea6f6058b6a4f81b3232d53e55191fd
powerpc/code-patching: Reorganise do_patch_instruction() to ease error handling

Split do_patch_instruction() in two functions, the caller doing the
spin locking and the callee doing everything else.

And remove a few unnecessary initialisations and intermediate
variables.

This allows the callee to return from anywhere in the function.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/dbc85980a0d2a935731b272e8907e8bb1d8fc8c5.1638446239.git.christophe.leroy@csgroup.eu
arch/powerpc/lib/code-patching.c