Skip to content

Commit

Permalink
iommu/dma: Cleanup dma-iommu.h
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Christoph Hellwig authored and Joerg Roedel committed May 27, 2019
1 parent cd6c84d commit 185da89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/linux/dma-iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
#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>
Expand Down Expand Up @@ -86,7 +85,7 @@ void iommu_dma_compose_msi_msg(struct msi_desc *desc,

void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);

#else
#else /* CONFIG_IOMMU_DMA */

struct iommu_domain;
struct msi_desc;
Expand Down Expand Up @@ -128,5 +127,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 */

0 comments on commit 185da89

Please sign in to comment.