linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux/types.h: enable endian checks for all sparse builds
@ 2016-12-08  2:29 Michael S. Tsirkin
  2016-12-08  5:21 ` Bart Van Assche
  2016-12-08 11:25 ` Cornelia Huck
  0 siblings, 2 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2016-12-08  2:29 UTC (permalink / raw)
  To: linux-kernel, Linus Torvalds, Christoph Hellwig
  Cc: linux-kernel, Jason Wang, linux-kbuild, Michal Marek,
	Arnd Bergmann, Greg Kroah-Hartman, Matt Mackall, Herbert Xu,
	David Airlie, Gerd Hoffmann, Ohad Ben-Cohen,
	Christian Borntraeger, Cornelia Huck, James E.J. Bottomley,
	David S. Miller, Jens Axboe, Neil Armstrong, Stefan Hajnoczi,
	Asias He, linux-crypto, dri-devel, virtualization, netdev,
	linux-remoteproc, linux-s390, kvm, linux-scsi, v9fs-developer

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

Linus, could you ack this for upstream? If yes I'll
merge through my tree as a replacement for enabling
this just for virtio.

 include/uapi/linux/types.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index acf0979..41e5914 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -23,11 +23,7 @@
 #else
 #define __bitwise__
 #endif
-#ifdef __CHECK_ENDIAN__
 #define __bitwise __bitwise__
-#else
-#define __bitwise
-#endif
 
 typedef __u16 __bitwise __le16;
 typedef __u16 __bitwise __be16;
-- 
MST

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-12-09 20:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08  2:29 [PATCH] linux/types.h: enable endian checks for all sparse builds Michael S. Tsirkin
2016-12-08  5:21 ` Bart Van Assche
2016-12-08  5:53   ` Michael S. Tsirkin
2016-12-08  6:38     ` Bart Van Assche
2016-12-08 11:13       ` Greg Kroah-Hartman
2016-12-08 16:17       ` Michael S. Tsirkin
2016-12-09  6:40         ` Madhani, Himanshu
2016-12-09 15:18           ` Bart Van Assche
2016-12-09 20:45             ` Michael S. Tsirkin
2016-12-08 11:25 ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).