Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

linux/types.h: enable endian checks for all sparse builds

By now, linux is mostly endian-clean. Enabling endian-ness
checks for everyone produces about 200 new sparse warnings for me -
less than 10% over the 2000 sparse warnings already there.

Not a big deal, OTOH enabling this helps people notice
they are introducing new bugs.

So let's just drop __CHECK_ENDIAN__. Follow-up patches
can drop distinction between __bitwise and __bitwise__.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

-4
-4
include/uapi/linux/types.h
··· 23 23 #else 24 24 #define __bitwise__ 25 25 #endif 26 - #ifdef __CHECK_ENDIAN__ 27 26 #define __bitwise __bitwise__ 28 - #else 29 - #define __bitwise 30 - #endif 31 27 32 28 typedef __u16 __bitwise __le16; 33 29 typedef __u16 __bitwise __be16;