iommu-common: Fix PARISC compile-time warnings
PATCH 1/1 iommu-common: Fix PARISC compile-time warnings
Fixes warnings due to
- no DMA_ERROR_CODE on PARISC,
- sizeof (unsigned long) = 4 bytes on PARISC.
Signed-off-by Sowmini Varadhan <[email protected]>
--- lib/iommu-common.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
lib/iommu-common.c +5 -1
@@ -10,6 +10,10 @@#include <linux/iommu-common.h> #include <linux/dma-mapping.h> +#ifndef DMA_ERROR_CODE +#define DMA_ERROR_CODE (~(dma_addr_t)0x0) +#endif +#define IOMMU_LARGE_ALLOC 15/*
@@ -121,7 +125,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, boundary_size =ALIGN (dma_get_seg_boundary (dev) +1 ,1 << iommu->page_table_shift); else - boundary_size =ALIGN (1UL <<32 ,1 << iommu->page_table_shift); + boundary_size =ALIGN (1ULL <<32 ,1 << iommu->page_table_shift); shift = iommu->page_table_map_base >> iommu->page_table_shift; boundary_size = boundary_size >> iommu->page_table_shift;
Signature · 1 line
1.7.1
From: Sowmini Varadhan <[email protected]>
Date: Thu, 16 Apr 2015 22:28:04 -0400
Quoted 5 lines
Fixes warnings due to
- noDMA_ERROR_CODEon PARISC,
- sizeof (unsigned long) = 4 bytes on PARISC.Signed-off-by Sowmini Varadhan <[email protected]>
I'll apply this, thanks Sowini.