diff options
author | Sowmini Varadhan <[email protected]> | 2015-08-06 15:46:39 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-08-07 04:39:41 +0300 |
commit | 447f6a95a9c80da7faaec3e66e656eab8f262640 (patch) | |
tree | afaa0a4191056cf029161d5e45cbf30bae27d8e5 | |
parent | 3e810ae2db76ccde770fd8e5a0de6408ea36e211 (diff) |
lib/iommu-common.c: do not use 0xffffffffffffffffl for computing align_mask
Using a 64 bit constant generates "warning: integer constant is too
large for 'long' type" on 32 bit platforms. Instead use ~0ul and
BITS_PER_LONG.
Detected by Andrew Morton on ARMD.
Signed-off-by: Sowmini Varadhan <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | lib/iommu-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/iommu-common.c b/lib/iommu-common.c index df30632f0bef..ff19f66d3f7f 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c @@ -119,7 +119,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, unsigned long align_mask = 0; if (align_order > 0) - align_mask = 0xffffffffffffffffl >> (64 - align_order); + align_mask = ~0ul >> (BITS_PER_LONG - align_order); /* Sanity check */ if (unlikely(npages == 0)) { |