diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-05-09 07:36:15 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-22 15:57:38 +1000 |
commit | c8deb28095f9cd2ee2f4d16e948c9e816a22811b (patch) | |
tree | b1019be28eddf8d2411c8dba5522038e6da670ca | |
parent | e89aa642be21b14e53bab40a37b8c6b0cf05143d (diff) | |
download | linux-stable-c8deb28095f9cd2ee2f4d16e948c9e816a22811b.tar.gz linux-stable-c8deb28095f9cd2ee2f4d16e948c9e816a22811b.tar.bz2 linux-stable-c8deb28095f9cd2ee2f4d16e948c9e816a22811b.zip |
powerpc/ftrace: Use size macro instead of opencoding
0x80000000 is SZ_2G. Use it.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Fix comparison against unsigned -SZ_2G]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/bb6626e884acffe87b58736291df57db3deaa9b9.1652074503.git.christophe.leroy@csgroup.eu
-rw-r--r-- | arch/powerpc/kernel/trace/ftrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c index ac3f97dd1729..eab86d817373 100644 --- a/arch/powerpc/kernel/trace/ftrace.c +++ b/arch/powerpc/kernel/trace/ftrace.c @@ -741,7 +741,7 @@ int __init ftrace_dyn_arch_init(void) #endif long reladdr = addr - kernel_toc_addr(); - if (reladdr > 0x7FFFFFFF || reladdr < -(0x80000000L)) { + if (reladdr >= SZ_2G || reladdr < -(long)SZ_2G) { pr_err("Address of %ps out of range of kernel_toc.\n", (void *)addr); return -1; |