On Mon, Jul 20 2015, Guenter Roeck <li...@roeck-us.net> wrote: > So either case ~0l appears to be wrong; it should be ~0ul.
Yes, right-shifting -1 of any type is probably always wrong, as it will always give -1 again. Probably one should add a smatch/sparse warning for that. > I don't know if ~0ull makes a difference for some architectures. 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. Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/