forked from Minki/linux
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 <sowmini.varadhan@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David S. Miller <davem@davemloft.net> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3e810ae2db
commit
447f6a95a9
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user