From: Andrew Morton <akpm@linux-foundation.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros
Date: Mon, 6 Apr 2009 17:59:18 -0700 [thread overview]
Message-ID: <20090406175918.c38654b2.akpm@linux-foundation.org> (raw)
In-Reply-To: <200904062159.n36Lx1OJ001967@hera.kernel.org>
On Mon, 6 Apr 2009 21:59:01 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
> Gitweb: http://git.kernel.org/linus/8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d
> Commit: 8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d
> Parent: 20bec8ab1458c24bed0d5492ee15d87807fc415a
> Author: David Woodhouse <David.Woodhouse@intel.com>
> AuthorDate: Fri Apr 3 15:19:32 2009 +0100
> Committer: David Woodhouse <David.Woodhouse@intel.com>
> CommitDate: Fri Apr 3 21:45:46 2009 +0100
Three days old? Never been in linux-next afaict.
Please don't do that.
> intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros
>
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> Acked-by: Ingo Molnar <mingo@elte.hu>
> ---
> include/linux/dmar.h | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/dmar.h b/include/linux/dmar.h
> index 2f34274..0b4aa80 100644
> --- a/include/linux/dmar.h
> +++ b/include/linux/dmar.h
> @@ -44,6 +44,14 @@ extern struct list_head dmar_drhd_units;
> #define for_each_drhd_unit(drhd) \
> list_for_each_entry(drhd, &dmar_drhd_units, list)
>
> +#define for_each_active_iommu(i, drhd) \
> + list_for_each_entry(drhd, &dmar_drhd_units, list) \
> + 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
> +
> extern int dmar_table_init(void);
> extern int dmar_dev_scope_init(void);
From: Andrew Morton <akpm@linux-foundation.org>
drivers/pci/intel-iommu.c:2637:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c: In function 'init_iommu_hw':
drivers/pci/intel-iommu.c:2637: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2638: error: '______r' undeclared (first use in this function)
drivers/pci/intel-iommu.c:2638: error: (Each undeclared identifier is reported only once
drivers/pci/intel-iommu.c:2638: error: for each function it appears in.)
drivers/pci/intel-iommu.c:2641:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c:2641: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2662:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c: In function 'iommu_flush_all':
drivers/pci/intel-iommu.c:2662: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2676:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c: In function 'iommu_suspend':
drivers/pci/intel-iommu.c:2676: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2678: error: too few arguments to function 'kzalloc'
drivers/pci/intel-iommu.c:2685:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c:2685: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2688: error: '__dummy' undeclared (first use in this function)
drivers/pci/intel-iommu.c:2704:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c:2704: error: expected '(' before '{' token
drivers/pci/intel-iommu.c:2721:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c:2737:35: error: macro "if" passed 2 arguments, but takes just 1
drivers/pci/intel-iommu.c: At top level:
drivers/pci/intel-iommu.c:2745: error: 'iommu_resume' undeclared here (not in a function)
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/dmar.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN include/linux/dmar.h~include-linux-dmarh-fix-build-with-config_profile_all_branches include/linux/dmar.h
--- a/include/linux/dmar.h~include-linux-dmarh-fix-build-with-config_profile_all_branches
+++ a/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);
_
next parent reply other threads:[~2009-04-07 1:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200904062159.n36Lx1OJ001967@hera.kernel.org>
2009-04-07 0:59 ` Andrew Morton [this message]
2009-04-07 1:09 ` intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros David Woodhouse
2009-04-07 1:19 ` David Woodhouse
2009-04-07 1:24 ` Andrew Morton
2009-04-07 1:29 ` Steven Rostedt
2009-04-07 2:58 ` David Woodhouse
2009-04-07 3:02 ` Steven Rostedt
2009-04-07 3:29 ` David Woodhouse
2009-04-08 11:00 ` Ingo Molnar
2009-04-09 0:42 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090406175918.c38654b2.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.