[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsparse warning about endianness mismatch on 0xffff assignment

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


 \ /
  Last update: 2015-04-16 08:41    [W:0.071 / U:36.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site