Re: [PATCH] intel-iommu: fix build with CONFIG_BRANCH_TRACER=y

From: David Woodhouse
Date: Tue Apr 07 2009 - 07:34:51 EST


On Tue, 2009-04-07 at 11:02 +0200, Ingo Molnar wrote:
> for_each_active_iommu() and for_each_iommu() uses some tricky
> C that is weird and borderline valid but does not allow the
> macro evaluation trick used by the branch tracer/profiler:
>
> drivers/pci/intr_remapping.c:680:28: error: macro "if" passed 2
> arguments, but takes just 1
>
> Switch it to a braced group statement.

It doesn't even need the braces -- just putting simple parens around the
comma-expression would have sufficed (that was Andrew's attempt).

But it's a workaround, not a fix -- if we're going to #define if() then
we should damn well make it transparent, and not have to work around
breakage in arbitrary places.

Hence the patch I sent to Linus last night, which fixes it in the
_right_ place:
http://marc.info/?l=linux-kernel&m=123907505308502&w=2

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation

--
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/