diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-01-30 14:02:37 +0100 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-02-07 12:45:18 -0500 |
commit | f94fe7048a352ff8914232a18e2e2f18f8a5ac81 (patch) | |
tree | 9b96a78f94513761045115e8bfbc18c7dfe3b468 /fs/vboxsf/super.c | |
parent | 01678fbce3dd2e3042077cf71b68157e733614a0 (diff) | |
download | linux-rpi-f94fe7048a352ff8914232a18e2e2f18f8a5ac81.tar.gz linux-rpi-f94fe7048a352ff8914232a18e2e2f18f8a5ac81.tar.bz2 linux-rpi-f94fe7048a352ff8914232a18e2e2f18f8a5ac81.zip |
ftrace: sample: avoid open-coded 64-bit division
Calculating the average period requires a 64-bit division that leads
to a link failure on 32-bit architectures:
x86_64-linux-ld: samples/ftrace/ftrace-ops.o: in function `ftrace_ops_sample_init':
ftrace-ops.c:(.init.text+0x23b): undefined reference to `__udivdi3'
Use the div_u64() helper to do this instead. Since this is an init function that
is not called frequently, the runtime overhead is going to be acceptable.
Link: https://lore.kernel.org/linux-trace-kernel/20230130130246.247537-1-arnd@kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: b56c68f705ca ("ftrace: Add sample with custom ops")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'fs/vboxsf/super.c')
0 files changed, 0 insertions, 0 deletions