Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932521AbcLHFyL (ORCPT ); Thu, 8 Dec 2016 00:54:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43224 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbcLHFyI (ORCPT ); Thu, 8 Dec 2016 00:54:08 -0500 Date: Thu, 8 Dec 2016 07:53:59 +0200 From: "Michael S. Tsirkin" To: Bart Van Assche Cc: "linux-kernel@vger.kernel.org" , Linus Torvalds , Christoph Hellwig , Jason Wang , "linux-kbuild@vger.kernel.org" , 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@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-remoteproc@vger.kernel.org" , "linux-s390@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "v9fs-developer@lists.sourceforge.net" Subject: Re: [PATCH] linux/types.h: enable endian checks for all sparse builds Message-ID: <20161208075152-mutt-send-email-mst@kernel.org> References: <1481164052-28036-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 08 Dec 2016 05:54:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 34 On Thu, Dec 08, 2016 at 05:21:47AM +0000, Bart Van Assche wrote: > On 12/07/16 18:29, Michael S. Tsirkin 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. > > > > 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__. > > Hello Michael, > > This patch makes a whole bunch of ccflags-y += -D__CHECK_ENDIAN__ > statements obsolete. Have you considered to remove these statements? Absolutely. Just waiting for feedback on the idea. > Additionally, there are notable exceptions to the rule that most drivers > are endian-clean, e.g. drivers/scsi/qla2xxx. I would appreciate it if it > would remain possible to check such drivers with sparse without enabling > endianness checks. Have you considered to change #ifdef __CHECK_ENDIAN__ > into e.g. #ifndef __DONT_CHECK_ENDIAN__? > > Thanks, > > Bart. The right thing is probably just to fix these, isn't it? Until then, why not just ignore the warnings? -- MST