Re: sparse warning about endianness mismatch on 0xffff assignment

From: Al Viro
Date: Thu Apr 16 2015 - 16:57:50 EST


On Thu, Apr 16, 2015 at 06:04:40AM +0000, Sathya Perla wrote:
> What would be the best way of fixing this warning?
>
> a) __le16 var = cpu_to_le16(0xFFFF);

That would do just fine - it's a constant expression, actually.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/