From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A2EEC282CE for ; Fri, 5 Apr 2019 17:43:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70714206BA for ; Fri, 5 Apr 2019 17:43:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731546AbfDERnB (ORCPT ); Fri, 5 Apr 2019 13:43:01 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53720 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730329AbfDERnA (ORCPT ); Fri, 5 Apr 2019 13:43:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 262FA168F; Fri, 5 Apr 2019 10:43:00 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C30FA3F557; Fri, 5 Apr 2019 10:42:58 -0700 (PDT) Subject: Re: [PATCH 04/21] dma-iommu: cleanup dma-iommu.h To: Christoph Hellwig Cc: Joerg Roedel , Catalin Marinas , Will Deacon , Tom Lendacky , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20190327080448.5500-1-hch@lst.de> <20190327080448.5500-5-hch@lst.de> From: Robin Murphy Message-ID: <7d7efc03-75b2-58c7-f744-d7bc3de6a771@arm.com> Date: Fri, 5 Apr 2019 18:42:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190327080448.5500-5-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/03/2019 08:04, Christoph Hellwig wrote: > No need for a __KERNEL__ guard outside uapi and add a missing comment > describing the #else cpp statement. Last but not least include > instead of the asm version, which is frowned upon. > > Signed-off-by: Christoph Hellwig > --- > include/linux/dma-iommu.h | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h > index e760dc5d1fa8..3e206f4ee173 100644 > --- a/include/linux/dma-iommu.h > +++ b/include/linux/dma-iommu.h > @@ -16,14 +16,14 @@ > #ifndef __DMA_IOMMU_H > #define __DMA_IOMMU_H > > -#ifdef __KERNEL__ > +#include > #include > -#include > > #ifdef CONFIG_IOMMU_DMA > #include > #include > #include > +#include Other than introducing this unnecessary dupe, Reviewed-by: Robin Murphy > int iommu_dma_init(void); > > @@ -74,7 +74,7 @@ void iommu_dma_unmap_resource(struct device *dev, dma_addr_t handle, > void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); > void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); > > -#else > +#else /* CONFIG_IOMMU_DMA */ > > struct iommu_domain; > struct msi_msg; > @@ -108,5 +108,4 @@ static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_he > } > > #endif /* CONFIG_IOMMU_DMA */ > -#endif /* __KERNEL__ */ > #endif /* __DMA_IOMMU_H */ >