]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/ftrace: Use BRANCH_SET_LINK instead of value 1
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 9 May 2022 05:36:13 +0000 (07:36 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 May 2022 13:11:29 +0000 (23:11 +1000)
To make it explicit, use BRANCH_SET_LINK instead of value 1
when calling create_branch().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/d57847063ac93660a5af620d4df1847f10edf61a.1652074503.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/trace/ftrace.c

index 010a8c7ff4ac7ae64c94eca65131097d764e29df..c4a68340a351ea57628c5492f3132038014bc4af 100644 (file)
@@ -45,7 +45,7 @@ ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
        addr = ppc_function_entry((void *)addr);
 
        /* if (link) set op to 'bl' else 'b' */
-       create_branch(&op, (u32 *)ip, addr, link ? 1 : 0);
+       create_branch(&op, (u32 *)ip, addr, link ? BRANCH_SET_LINK : 0);
 
        return op;
 }