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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -16,9 +16,8 @@ · 15 unmodified lines | ||
| 16 | 16 | #ifndef __DMA_IOMMU_H |
| 17 | 17 | #define __DMA_IOMMU_H |
| 18 | 18 | |
| 19 | −#ifdef __KERNEL__ | |
| 19 | +#include <linux/errno.h> | |
| 20 | 20 | #include <linux/types.h> |
| 21 | −#include <asm/errno.h> | |
| 22 | 21 | |
| 23 | 22 | #ifdef CONFIG_IOMMU_DMA |
| 24 | 23 | #include <linux/dma-mapping.h> |
| @@ -86,7 +85,7 @@ void iommu_dma_compose_msi_msg(struct msi_desc *desc, · 61 unmodified lines | ||
| 86 | 85 | |
| 87 | 86 | void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); |
| 88 | 87 | |
| 89 | −#else | |
| 88 | +#else /* CONFIG_IOMMU_DMA */ | |
| 90 | 89 | |
| 91 | 90 | struct iommu_domain; |
| 92 | 91 | struct msi_desc; |
| @@ -128,5 +127,4 @@ static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_he · 35 unmodified lines | ||
| 128 | 127 | } |
| 129 | 128 | |
| 130 | 129 | #endif /* CONFIG_IOMMU_DMA */ |
| 131 | −#endif /* __KERNEL__ */ | |
| 132 | 130 | #endif /* __DMA_IOMMU_H */ |