aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/platform.c
diff options
context:
space:
mode:
authorPan Taixi <[email protected]>2025-05-26 01:37:31 +0000
committerSteven Rostedt (Google) <[email protected]>2025-05-28 20:10:43 +0000
commit2fbdb6d8e03b70668c0876e635506540ae92ab05 (patch)
tree98ede86825acd73e4889bc5a3cffe84a40beb1e2 /rust/helpers/platform.c
parenttracing: Record trace_clock and recover when reboot (diff)
downloadkernel-2fbdb6d8e03b70668c0876e635506540ae92ab05.tar.gz
kernel-2fbdb6d8e03b70668c0876e635506540ae92ab05.zip
tracing: Fix compilation warning on arm32
On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is unsigned long. This hence triggers a compilation warning as min() asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t solves this issue and works on other target architectures as well. Compilation warning details: kernel/trace/trace.c: In function 'tracing_splice_read_pipe': ./include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ ./include/linux/minmax.h:26:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ ... kernel/trace/trace.c:6771:8: note: in expansion of macro 'min' min((size_t)trace_seq_used(&iter->seq), ^~~ Cc: [email protected] Link: https://lore.kernel.org/[email protected] Fixes: f5178c41bb43 ("tracing: Fix oob write in trace_seq_to_buffer()") Reviewed-by: Jeongjun Park <[email protected]> Signed-off-by: Pan Taixi <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions