From: Paul Mundt Date: Tue, 25 Aug 2009 09:39:33 +0000 (+0900) Subject: sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX. X-Git-Tag: Ubuntu-5.13.0-19.19~34785^2~35^2~13 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c68e3206862f647117a46a73af76764d750c05bd;p=mirror_ubuntu-jammy-kernel.git sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX. This is supposed to be the equivalent of __NR_syscalls, not __NR_syscalls -1. The x86 code this was based on had simply fallen out of sync at the time this was implemented. Fix it up now. As a result, tracing of __NR_perf_counter_open works as advertised. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h index 3c2ede3690d7..12f3a31f20af 100644 --- a/arch/sh/include/asm/ftrace.h +++ b/arch/sh/include/asm/ftrace.h @@ -4,7 +4,7 @@ #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ -#define FTRACE_SYSCALL_MAX (NR_syscalls - 1) +#define FTRACE_SYSCALL_MAX NR_syscalls #ifndef __ASSEMBLY__ extern void mcount(void);