From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932291AbcLHLVk (ORCPT ); Thu, 8 Dec 2016 06:21:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55796 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753219AbcLHLVa (ORCPT ); Thu, 8 Dec 2016 06:21:30 -0500 Date: Thu, 8 Dec 2016 12:13:25 +0100 From: Greg Kroah-Hartman To: Bart Van Assche Cc: "Michael S. Tsirkin" , "linux-kernel@vger.kernel.org" , Linus Torvalds , Christoph Hellwig , Jason Wang , "linux-kbuild@vger.kernel.org" , Michal Marek , Arnd Bergmann , 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: <20161208111325.GB29138@kroah.com> 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 08, 2016 at 06:38:11AM +0000, Bart Van Assche wrote: > On 12/07/16 21:54, Michael S. Tsirkin wrote: > > On Thu, Dec 08, 2016 at 05:21:47AM +0000, Bart Van Assche wrote: > >> 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__? > > > > The right thing is probably just to fix these, isn't it? > > Until then, why not just ignore the warnings? > > Neither option is realistic. With endian-checking enabled the qla2xxx > driver triggers so many warnings that it becomes a real challenge to > filter the non-endian warnings out manually: > > $ for f in "" CF=-D__CHECK_ENDIAN__; do make M=drivers/scsi/qla2xxx C=2\ > $f | &grep -c ': warning:'; done > 4 > 752 > > If you think it would be easy to fix the endian warnings triggered by > the qla2xxx driver, you are welcome to try to fix these. Please don't let one crappy, obviously broken, driver prevent this good change from happening which will help ensure that the rest of the kernel (i.e. 99% of it) can be easily tested and fixed for endian issues. Sounds like you should just fix the driver up if it has so many problems, and it annoys you so much that you have to filter out some warnings to see the others :) thanks, greg k-h