[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CF9D1877D81D214CB0CA0669EFAE020C74CF869F@CMEXMB1.ad.emulex.com>
Date: Thu, 16 Apr 2015 06:04:40 +0000
From: Sathya Perla <Sathya.Perla@...lex.Com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: sparse warning about endianness mismatch on 0xffff assignment
Hi,
The following code causes a sparse warning about " incorrect type in assignment (different base types)"
__le16 var = 0xFFFF;
What would be the best way of fixing this warning?
a) __le16 var = cpu_to_le16(0xFFFF);
b) __le16 var = (__force __le16) 0xFFFF;
c) Ignore the warning and/or fix the sparse tool to not warn about endianness mismatch on an "all 1s" assignment
thanks,
-Sathya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists