From: Bart Van Assche Subject: Re: [PATCH] linux/types.h: enable endian checks for all sparse builds Date: Thu, 8 Dec 2016 06:38:11 +0000 Message-ID: References: <1481164052-28036-1-git-send-email-mst@redhat.com> <20161208075152-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 Return-path: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On 12/07/16 21:54, Michael S. Tsirkin wrote:=0A= > On Thu, Dec 08, 2016 at 05:21:47AM +0000, Bart Van Assche wrote:=0A= >> Additionally, there are notable exceptions to the rule that most drivers= =0A= >> are endian-clean, e.g. drivers/scsi/qla2xxx. I would appreciate it if it= =0A= >> would remain possible to check such drivers with sparse without enabling= =0A= >> endianness checks. Have you considered to change #ifdef __CHECK_ENDIAN__= =0A= >> into e.g. #ifndef __DONT_CHECK_ENDIAN__?=0A= >=0A= > The right thing is probably just to fix these, isn't it?=0A= > Until then, why not just ignore the warnings?=0A= =0A= Neither option is realistic. With endian-checking enabled the qla2xxx =0A= driver triggers so many warnings that it becomes a real challenge to =0A= filter the non-endian warnings out manually:=0A= =0A= $ for f in "" CF=3D-D__CHECK_ENDIAN__; do make M=3Ddrivers/scsi/qla2xxx C= =3D2\=0A= $f | &grep -c ': warning:'; done=0A= 4=0A= 752=0A= =0A= If you think it would be easy to fix the endian warnings triggered by =0A= the qla2xxx driver, you are welcome to try to fix these.=0A= =0A= Bart.=0A=