Messages in this thread |  | | Date | Mon, 20 Jul 2015 21:25:31 +0200 | | From | Sowmini Varadhan <> | | Subject | Re: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask |
| |
On (07/20/15 19:57), Rasmus Villemoes wrote: > I highly doubt it. The result is truncated to unsigned long > anyway. Assuming align_order always has a value between 0 and > BITS_PER_LONG, GENMASK should be exactly what is wanted.
While GENMASK may do the job, the code is already quite obscure, so I'm going to stick with the minimal delta to get this right, namely
- align_mask = 0xffffffffffffffffl >> (64 - align_order); + align_mask = ~0ul >> (BITS_PER_LONG - align_order);
--Sowmini
|  |