powerpc: Change calling convention for create_branch() et. al.
authorJordan Niethe <jniethe5@gmail.com>
Wed, 6 May 2020 03:40:25 +0000 (13:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 14:10:36 +0000 (00:10 +1000)
commit7c95d8893fb55869882c9f68f4c94840dc43f18f
tree96566e99f23b18330b70ea10a6e6b4128d0c52b1
parent5a7fdcab54ef17c395fc47e73c828a1432e51683
powerpc: Change calling convention for create_branch() et. al.

create_branch(), create_cond_branch() and translate_branch() return the
instruction that they create, or return 0 to signal an error. Separate
these concerns in preparation for an instruction type that is not just
an unsigned int.  Fill the created instruction to a pointer passed as
the first parameter to the function and use a non-zero return value to
signify an error.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Link: https://lore.kernel.org/r/20200506034050.24806-6-jniethe5@gmail.com
arch/powerpc/include/asm/code-patching.h
arch/powerpc/kernel/optprobes.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/lib/code-patching.c
arch/powerpc/lib/feature-fixups.c