[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090407090229.GA2467@elte.hu>
Date: Tue, 7 Apr 2009 11:02:29 +0200
From: Ingo Molnar <mingo@...e.hu>
To: David Woodhouse <dwmw2@...radead.org>
Cc: torvalds@...ux-foundation.org, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
* Ingo Molnar <mingo@...e.hu> wrote:
> there's another new build failure as well:
>
> drivers/pci/intr_remapping.c:680:28: error: macro "if" passed 2 arguments, but takes just 1
> drivers/pci/intr_remapping.c:694:28: error: macro "if" passed 2 arguments, but takes just 1
> drivers/pci/intr_remapping.c:701:28: error: macro "if" passed 2 arguments, but takes just 1
fixed below.
Ingo
--------------->
>From f7f79511ff41d3e9b363df55fa3d5d5dd8bfe790 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@...e.hu>
Date: Tue, 7 Apr 2009 11:01:59 +0200
Subject: [PATCH] intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
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.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
include/linux/dmar.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index e397dc3..166670f 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -47,11 +47,11 @@ extern struct list_head dmar_drhd_units;
#define for_each_active_iommu(i, drhd) \
list_for_each_entry(drhd, &dmar_drhd_units, list) \
- if (i=drhd->iommu, drhd->ignored) {} else
+ if (({i=drhd->iommu, drhd->ignored;})) {} else
#define for_each_iommu(i, drhd) \
list_for_each_entry(drhd, &dmar_drhd_units, list) \
- if (i=drhd->iommu, 0) {} else
+ if (({ i=drhd->iommu, 0;})) {} else
extern int dmar_table_init(void);
extern int dmar_dev_scope_init(void);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists