From: Linus Torvalds Date: Tue, 7 Apr 2009 14:59:41 +0000 (-0700) Subject: branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab3c9c686e22;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y Fix the branch tracer barfing on comma statements within if () statements. Signed-off-by: Ingo Molnar --- diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 8872ad6dd89b..37bcb50a4d7c 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -115,7 +115,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); * "Define 'is'", Bill Clinton * "Define 'if'", Steven Rostedt */ -#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \ +#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) +#define __trace_if(cond) \ + if (__builtin_constant_p((cond)) ? !!(cond) : \ ({ \ int ______r; \ static struct ftrace_branch_data \