diff options
author | Borislav Petkov <bp@alien8.de> | 2010-09-29 04:08:23 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-10-13 11:47:53 -0400 |
commit | 14cae9bd2faf6d0d75702c2e107e75207bcdfec1 (patch) | |
tree | 78b3d25ee41713ae5324c6f19e149817605780ac /kernel/trace | |
parent | 7cd2541cf2395962daf98ec32a141aba3398a9b2 (diff) |
tracing: Fix function-graph build warning on 32-bit
Fix
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: Borislav Petkov <bp@alien8.de>
Cc: Chase Douglas <chase.douglas@canonical.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20100929080823.GA13595@liondog.tnic>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 02c708ae0d42..ef49e9370b25 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -665,8 +665,9 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s) | |||
665 | 665 | ||
666 | /* Print nsecs (we don't want to exceed 7 numbers) */ | 666 | /* Print nsecs (we don't want to exceed 7 numbers) */ |
667 | if (len < 7) { | 667 | if (len < 7) { |
668 | snprintf(nsecs_str, min(sizeof(nsecs_str), 8UL - len), "%03lu", | 668 | size_t slen = min_t(size_t, sizeof(nsecs_str), 8UL - len); |
669 | nsecs_rem); | 669 | |
670 | snprintf(nsecs_str, slen, "%03lu", nsecs_rem); | ||
670 | ret = trace_seq_printf(s, ".%s", nsecs_str); | 671 | ret = trace_seq_printf(s, ".%s", nsecs_str); |
671 | if (!ret) | 672 | if (!ret) |
672 | return TRACE_TYPE_PARTIAL_LINE; | 673 | return TRACE_TYPE_PARTIAL_LINE; |