aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-10 10:14:35 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-10 10:14:35 -0400
commitce8eb2bf05042452107e489782105d2e235cbdd0 (patch)
treef90790e543c221e3b0bac963bd8afa96e79a06ed /kernel/trace/trace_events.c
parent157587d7ac555458da9f682e3250135e468470a6 (diff)
tracing: fix printk format specifier
Impact: clean up The offsetof and sizeof are of type size_t, and instead of typecasting them to unsigned int for printk formatting, one could just use %zu. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 1880a6438097..a0b41cc26f26 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -338,8 +338,7 @@ event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
338 338
339#undef FIELD 339#undef FIELD
340#define FIELD(type, name) \ 340#define FIELD(type, name) \
341 #type, #name, (unsigned int)offsetof(typeof(field), name), \ 341 #type, #name, offsetof(typeof(field), name), sizeof(field.name)
342 (unsigned int)sizeof(field.name)
343 342
344static int trace_write_header(struct trace_seq *s) 343static int trace_write_header(struct trace_seq *s)
345{ 344{
@@ -347,11 +346,11 @@ static int trace_write_header(struct trace_seq *s)
347 346
348 /* struct trace_entry */ 347 /* struct trace_entry */
349 return trace_seq_printf(s, 348 return trace_seq_printf(s,
350 "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" 349 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n"
351 "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" 350 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n"
352 "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" 351 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n"
353 "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" 352 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n"
354 "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" 353 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n"
355 "\n", 354 "\n",
356 FIELD(unsigned char, type), 355 FIELD(unsigned char, type),
357 FIELD(unsigned char, flags), 356 FIELD(unsigned char, flags),