From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, Neil Armstrong <narmstrong@baylibre.com>,
David Airlie <airlied@linux.ie>,
linux-remoteproc@vger.kernel.org,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
linux-s390@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
linux-scsi@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
v9fs-developer@lists.sourceforge.net, Asias He <asias@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-kbuild@vger.kernel.org, Jens Axboe <axboe@fb.com>,
Michal Marek <mmarek@suse.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Matt Mackall <mpm@selenic.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
netdev@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] linux/types.h: enable endian checks for all sparse builds
Date: Thu, 8 Dec 2016 12:25:53 +0100 [thread overview]
Message-ID: <20161208122553.5fa5a09c.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1481164052-28036-1-git-send-email-mst@redhat.com>
On Thu, 8 Dec 2016 04:29:39 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> 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.
Out of curiousity: Where do most of those warnings show up?
>
> 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;
FWIW, I like this better than just enabling it for the virtio code.
prev parent reply other threads:[~2016-12-08 11:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161208122553.5fa5a09c.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=asias@redhat.com \
--cc=axboe@fb.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=herbert@gondor.apana.org.au \
--cc=jejb@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=mpm@selenic.com \
--cc=mst@redhat.com \
--cc=narmstrong@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).