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.
Unified · Split
| @@ -665,8 +665,9 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s) · 664 unmodified lines | |||
| 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; |