Skip to content

Commit

Permalink
iommu-common: Fix PARISC compile-time warnings
Browse files Browse the repository at this point in the history
Fixes warnings due to
- no DMA_ERROR_CODE on PARISC,
- sizeof (unsigned long) == 4 bytes on PARISC.

Signed-off-by: Sowmini Varadhan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sowminiv authored and davem330 committed Apr 18, 2015
1 parent 0ae53ed commit 2f0c0fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/iommu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#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);
Expand Down Expand Up @@ -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;
/*
Expand Down

0 comments on commit 2f0c0fd

Please sign in to comment.