Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752871AbcLHFVw (ORCPT ); Thu, 8 Dec 2016 00:21:52 -0500 Received: from mail-dm3nam03on0088.outbound.protection.outlook.com ([104.47.41.88]:31776 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750989AbcLHFVu (ORCPT ); Thu, 8 Dec 2016 00:21:50 -0500 From: Bart Van Assche To: "Michael S. Tsirkin" , "linux-kernel@vger.kernel.org" , Linus Torvalds , Christoph Hellwig CC: 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 Thread-Topic: [PATCH] linux/types.h: enable endian checks for all sparse builds Thread-Index: AQHSURL2jA2A7bS1DkWDvmuec7SNmA== Date: Thu, 8 Dec 2016 05:21:47 +0000 Message-ID: References: <1481164052-28036-1-git-send-email-mst@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@sandisk.com; x-originating-ip: [24.7.116.167] x-ms-office365-filtering-correlation-id: f217288e-081c-4dc8-4caf-08d41f2a1b4f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR02MB1683; x-microsoft-exchange-diagnostics: 1;BLUPR02MB1683;7:a2+4xFesOisuRXOsRkiKUosdHHupn+i63qGv6WWQnTuPBnRr5GQt+3UOZhsrvTYbQQ5GVe3swko4Y/+yiGwFFCtxPqA6O2FDrsDOIiBeBS2gMvgTHVfVk+bMOdsr64pw94AeJTEhNOdbq+lecj/GkPuDZAnjtyAqm2Xm6NKviEhREfDPzpLqtUoDq/WVGtRHdIvCYRGtVez6TweGa53/Bs5dqkS54o4vnOPx2wiVKNiIF1Wo7xpW/3Y8xqO0UlRweTxHDR21KQ1XgmieHTzq51gXs8B+s3yN48uQGunG+bJTh8MtjOmHkr8ARM1HJY+eHVIUww8T7ysTXzx02isC2Q6N+QfzZ+r9KAat7Z194cEaRxAq8iK0/TpL1c4s8mkuGNNkczFFkPupBXOgidAB22SLomIZOcptlXjFimY16YXDu7hIghievp7xq5xylyOO5Wqshd40P0jUIklqV6/SpA==;20:mRX9bmt6apGVgSomfELagt51TxosiGvdBGQvGjIUgFFhIHnXd3askvUEIwW1C8mghZxOw14ijiwgMQC8wcgs81dn/tHSr2m89R/GITXsnziTze3l7AzEK0V3fV2h0Z6n7s+VwPh31+wzcCRCLZv7e5mEELYW/iSSmVcz/e4mQQUjadutZ25g4W34/xF/VO0G+zqlfe1Jh3gDCmsYjyJvjXxY1Tq3UCqd7ywIxp9l/LDGPvGeiQWfQ5/rvPloaB3r x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148);SRVR:BLUPR02MB1683;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB1683; x-forefront-prvs: 0150F3F97D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39840400002)(39410400002)(39860400002)(39850400002)(39450400003)(24454002)(189002)(199003)(52544003)(189998001)(76576001)(74316002)(229853002)(2900100001)(66066001)(81156014)(81166006)(6506006)(8936002)(7736002)(305945005)(2501003)(86362001)(8676002)(7846002)(99286002)(7406005)(106356001)(122556002)(7416002)(68736007)(5660300001)(105586002)(38730400001)(77096006)(2906002)(3846002)(50986999)(5001770100001)(102836003)(92566002)(7696004)(97736004)(6116002)(33656002)(9686002)(4326007)(3280700002)(106116001)(76176999)(101416001)(3660700001)(54356999);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR02MB1683;H:BLUPR02MB1683.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2016 05:21:47.1070 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB1683 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uB85M0A0021683 Content-Length: 953 Lines: 25 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? 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.