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 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/

Reply via email to