Re: [PATCH] ftrace: type cast verifier

From: Ingo Molnar
Date: Wed Oct 01 2008 - 13:43:24 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> +#define FTRACE_CMP_TYPE(var, type) \
> + __builtin_types_compatible_p(typeof(var), type *)

ah, the -rt type trick ;-)

i'd suggest one more small detail:

> + struct trace_mmiotrace_map *field;
> + struct mmiotrace_map *m;

> + trace_assign_type(field, entry);

could you rename it to trace_type() - that way the initialization could
be written in a more compact way as:

> + struct trace_mmiotrace_map *field = trace_type(field, entry);

[ NOTE: there's namespace clash with a local symbol in ./trace_irqsoff.c
and a trace_type enum as well ]

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/