lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ