From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756187AbdEROS5 (ORCPT ); Thu, 18 May 2017 10:18:57 -0400 Received: from foss.arm.com ([217.140.101.70]:60694 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755807AbdEROSw (ORCPT ); Thu, 18 May 2017 10:18:52 -0400 Subject: Re: [PATCH] iommu/dma: fix function declaration To: Arnd Bergmann , Joerg Roedel References: <20170518132402.1355029-1-arnd@arndb.de> Cc: Magnus Damm , Will Deacon , linux-kernel@vger.kernel.org From: Robin Murphy Message-ID: <1bdb7e2b-d083-00c4-3c1c-ce6e88e0d2d4@arm.com> Date: Thu, 18 May 2017 15:18:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170518132402.1355029-1-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > --- > 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) > { >