Commit 14cae9bd authored by Borislav Petkov's avatar Borislav Petkov Committed by Frederic Weisbecker

tracing: Fix function-graph build warning on 32-bit


kernel/trace/trace_functions_graph.c: In function ‘trace_print_graph_duration’:
kernel/trace/trace_functions_graph.c:652: warning: comparison of distinct pointer types lacks a cast

when building 36-rc6 on a 32-bit due to the strict type check failing
in the min() macro.
Signed-off-by: default avatarBorislav Petkov <>
Cc: Chase Douglas <>
Cc: Steven Rostedt <>
Cc: Ingo Molnar <>
LKML-Reference: <20100929080823.GA13595@liondog.tnic>
Signed-off-by: default avatarFrederic Weisbecker <>
parent 7cd2541c
......@@ -665,8 +665,9 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s)
/* Print nsecs (we don't want to exceed 7 numbers) */
if (len < 7) {
snprintf(nsecs_str, min(sizeof(nsecs_str), 8UL - len), "%03lu",
size_t slen = min_t(size_t, sizeof(nsecs_str), 8UL - len);
snprintf(nsecs_str, slen, "%03lu", nsecs_rem);
ret = trace_seq_printf(s, ".%s", nsecs_str);
if (!ret)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment