Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1644509 > unrolled thread

[PATCH] iommu/dma: fix function declaration

Started byArnd Bergmann <arnd@arndb.de>
First post2017-05-18 15:30 +0200
Last post2017-05-19 13:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iommu/dma: fix function declaration Arnd Bergmann <arnd@arndb.de> - 2017-05-18 15:30 +0200
    Re: [PATCH] iommu/dma: fix function declaration Robin Murphy <robin.murphy@arm.com> - 2017-05-18 16:20 +0200
    Re: [PATCH] iommu/dma: fix function declaration Joerg Roedel <jroedel@suse.de> - 2017-05-19 13:40 +0200

#1644509 — [PATCH] iommu/dma: fix function declaration

FromArnd Bergmann <arnd@arndb.de>
Date2017-05-18 15:30 +0200
Subject[PATCH] iommu/dma: fix function declaration
Message-ID<tItF8-37o-27@gated-at.bofh.it>
Newly added code in the ipmmu-vmsa driver showed a small mistake
in a header file that can't be included by itself without CONFIG_IOMMU_DMA
enabled:

In file included from drivers/iommu/ipmmu-vmsa.c:13:0:
include/linux/dma-iommu.h:105:94: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

This adds a forward declaration for 'struct device', similar to how
we treat the other struct types in this case.

Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops")
Fixes: 273df9635385 ("iommu/dma: Make PCI window reservation generic")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/dma-iommu.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h
index 4eac2670bfa1..92f20832fd28 100644
--- a/include/linux/dma-iommu.h
+++ b/include/linux/dma-iommu.h
@@ -78,6 +78,7 @@ void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
 
 struct iommu_domain;
 struct msi_msg;
+struct device;
 
 static inline int iommu_dma_init(void)
 {
-- 
2.9.0

[toc] | [next] | [standalone]


#1644589

FromRobin Murphy <robin.murphy@arm.com>
Date2017-05-18 16:20 +0200
Message-ID<tIurw-3RH-9@gated-at.bofh.it>
In reply to#1644509
On 18/05/17 14:13, Arnd Bergmann wrote:
> Newly added code in the ipmmu-vmsa driver showed a small mistake
> in a header file that can't be included by itself without CONFIG_IOMMU_DMA
> enabled:
> 
> In file included from drivers/iommu/ipmmu-vmsa.c:13:0:
> include/linux/dma-iommu.h:105:94: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> 
> This adds a forward declaration for 'struct device', similar to how
> we treat the other struct types in this case.

Oops, looks like this was latent from day one, thanks Arnd.

Acked-by: Robin Murphy <robin.murphy@arm.com>

> Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops")
> Fixes: 273df9635385 ("iommu/dma: Make PCI window reservation generic")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/dma-iommu.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h
> index 4eac2670bfa1..92f20832fd28 100644
> --- a/include/linux/dma-iommu.h
> +++ b/include/linux/dma-iommu.h
> @@ -78,6 +78,7 @@ void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
>  
>  struct iommu_domain;
>  struct msi_msg;
> +struct device;
>  
>  static inline int iommu_dma_init(void)
>  {
> 

[toc] | [prev] | [next] | [standalone]


#1645545

FromJoerg Roedel <jroedel@suse.de>
Date2017-05-19 13:40 +0200
Message-ID<tIOqe-1ui-19@gated-at.bofh.it>
In reply to#1644509
On Thu, May 18, 2017 at 03:13:57PM +0200, Arnd Bergmann wrote:
> Newly added code in the ipmmu-vmsa driver showed a small mistake
> in a header file that can't be included by itself without CONFIG_IOMMU_DMA
> enabled:
> 
> In file included from drivers/iommu/ipmmu-vmsa.c:13:0:
> include/linux/dma-iommu.h:105:94: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> 
> This adds a forward declaration for 'struct device', similar to how
> we treat the other struct types in this case.
> 
> Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops")
> Fixes: 273df9635385 ("iommu/dma: Make PCI window reservation generic")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web