Message ID | 20190327080448.5500-5-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/21] arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable | expand |
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 > <linux/errno.h> instead of the asm version, which is frowned upon. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > 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 <linux/errno.h> > #include <linux/types.h> > -#include <asm/errno.h> > > #ifdef CONFIG_IOMMU_DMA > #include <linux/dma-mapping.h> > #include <linux/iommu.h> > #include <linux/msi.h> > +#include <linux/types.h> Other than introducing this unnecessary dupe, Reviewed-by: Robin Murphy <robin.murphy@arm.com> > 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 */ >
On Fri, Apr 05, 2019 at 06:42:57PM +0100, Robin Murphy wrote:
> Other than introducing this unnecessary dupe,
Fixed.
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 <linux/errno.h> #include <linux/types.h> -#include <asm/errno.h> #ifdef CONFIG_IOMMU_DMA #include <linux/dma-mapping.h> #include <linux/iommu.h> #include <linux/msi.h> +#include <linux/types.h> 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 */
No need for a __KERNEL__ guard outside uapi and add a missing comment describing the #else cpp statement. Last but not least include <linux/errno.h> instead of the asm version, which is frowned upon. Signed-off-by: Christoph Hellwig <hch@lst.de> --- include/linux/dma-iommu.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)