diff options
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 4488d90e75ef..fa32ca320767 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -448,8 +448,9 @@ event_available_types_read(struct file *filp, char __user *ubuf, size_t cnt, | |||
448 | } | 448 | } |
449 | 449 | ||
450 | #undef FIELD | 450 | #undef FIELD |
451 | #define FIELD(type, name) \ | 451 | #define FIELD(type, name) \ |
452 | #type, #name, offsetof(typeof(field), name), sizeof(field.name) | 452 | #type, #name, (unsigned int)offsetof(typeof(field), name), \ |
453 | (unsigned int)sizeof(field.name) | ||
453 | 454 | ||
454 | static int trace_write_header(struct trace_seq *s) | 455 | static int trace_write_header(struct trace_seq *s) |
455 | { | 456 | { |
@@ -457,11 +458,11 @@ static int trace_write_header(struct trace_seq *s) | |||
457 | 458 | ||
458 | /* struct trace_entry */ | 459 | /* struct trace_entry */ |
459 | return trace_seq_printf(s, | 460 | return trace_seq_printf(s, |
460 | "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" | 461 | "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" |
461 | "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" | 462 | "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" |
462 | "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" | 463 | "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" |
463 | "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" | 464 | "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" |
464 | "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" | 465 | "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" |
465 | "\n", | 466 | "\n", |
466 | FIELD(unsigned char, type), | 467 | FIELD(unsigned char, type), |
467 | FIELD(unsigned char, flags), | 468 | FIELD(unsigned char, flags), |