]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
iommu-common: Fix PARISC compile-time warnings
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Sat, 18 Apr 2015 19:33:55 +0000 (12:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Apr 2015 19:34:50 +0000 (12:34 -0700)
Fixes warnings due to
- no DMA_ERROR_CODE on PARISC,
- sizeof (unsigned long) == 4 bytes on PARISC.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/iommu-common.c

index b99f1d744a8dd67e6b7d7961b6e3cfbb8a07c381..a1a517cba7ec3bea6140957d2e549317717dedcf 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/hash.h>
 
+#ifndef        DMA_ERROR_CODE
+#define        DMA_ERROR_CODE (~(dma_addr_t)0x0)
+#endif
+
 unsigned long iommu_large_alloc = 15;
 
 static DEFINE_PER_CPU(unsigned int, iommu_pool_hash);
@@ -171,7 +175,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev,
                boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
                                      1 << iommu->table_shift);
        else
-               boundary_size = ALIGN(1UL << 32, 1 << iommu->table_shift);
+               boundary_size = ALIGN(1ULL << 32, 1 << iommu->table_shift);
 
        boundary_size = boundary_size >> iommu->table_shift;
        /*